QPx_GetImageFileInfo(imagePath; imagePath; imagePath; imagePath; imagePath; imagePath):error
imagePath Text Full path to image file
imageWidth Longint Image width in pixels
imageHeight Longint Image height in pixels
pixelDepth Longint Image depth
hRes Longint Horizontal image resolution in dots/inch (dpi)
vRes Longint Vertical image resolution in dots/inch (dpi)
error Longint Error result

Get the properties of an image file

The imagePath parameter contains the full pathname to the image file. If imagePath is empty, QPix presents a file selection dialog where the user can preview and select an image file. If the user selects a file, its full pathname is returned in imagePath, otherwise error qpx_userCancelErr is returned.

Image dimensions are returned in imageWidth and imageHeight, horizontal and vertical resolution in hRes and vRes and pixel depth in pixelDepth. Possible values for pixelDepth are:

qpx_BlackAndWhite 1 Black and white
qpx_FourColors 2 Four colors
qpx_SixteenColors 4 Sixteen colors
qpx_TwoHundredFiftySixColors 8 256 colors
qpx_ThousandsColors 16 Thousands of colors
qpx_MillionColors 24 Million of colors
qpx_MillionColorsPlusAlpha 32 Million of colors plus alpha
qpx_FourGrays 34 Four grays
qpx_SixteenGrays 36 Sixteen grays
qpx_TwoHundredFiftySixGrays 40 256 grays


   // Get image info

$imagePath:="Hard disk:images:people.gif"

$error:=QPx_GetImageFileInfo ($imagePath;$width;$height;$depth;$hRes;$vRes)

If ($error=qpx_noErr)
      //Work with image info
End if 

Related commands

QPx_GetImageFileColorSpace Get the color space of an image
QPx_GetImageFileColorProfile Get the color profile of an image