### QPx_GetImageFileInfo

QPx_GetImageFileInfo(imagePath; imageWidth; imageHeight; pixelDepth; hRes; vRes):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

Returns 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

Example

``Get image info` `C_LONGINT($error)` `C_TEXT($imagePath)` `C_LONGINT($width;$height;$depth;$hRes;$vRes)` `` `$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 | Returns the color space of an image
QPx_GetImageFileColorProfile | Returns the color profile of an image

QPix © Escape
Generated by QDoc 2.8 on Wed, Feb 17, 2010 17:42:57