QPix Command Reference
Image Files
|
|
| 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:
| Black and white images | 1 |
| Color images | 2, 8, 16, 24, 32 |
| Grayscale images | 34 (2 bit), 36 (4-bit), 40 (8-bit) |
Example
`Get image infoC_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 infoEnd if |