This function returns the width, height, and number of Bits Per Pixel, from the DIB of the image indicated by handle hIGear.
Declaration:
|
Copy Code
|
AT_ERRCOUNT ACCUAPI IG_image_dimensions_get(
HIGEAR hIGear,
LPAT_DIMENSION lpWidth,
LPAT_DIMENSION lpHeight,
LPUINT lpBitsPerPixel
);
|
Arguments:
Name |
Type |
Description |
hIGear |
HIGEAR |
ImageGear handle of image. |
lpWidth |
LPAT_DIMENSION |
Pointer to a variable which will receive image width (number of pixels per row). |
lpHeight |
LPAT_DIMENSION |
Pointer to a variable which will receive image height (number of rows). |
lpBitsPerPixel |
LPUINT |
Pointer to a variable which will receive image bit depth (number of Bits Per Pixel). |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
All pixel formats supported by ImageGear for C and C++.
Sample:
Color, Display, Image Processing
Example:
|
Copy Code
|
AT_ERRCOUNT nErrcount; // Number of errors on stack
HIGEAR hIGear; // Handle of image
AT_DIMENSION nWidth, nHeight; // Will hold returned width and height
UINT nBpp; // Will hold returned bits per pixel
// Load image file "picture.bmp" from working directory
nErrcount = IG_load_file("picture.bmp", &hIGear);
if(nErrcount == 0)
{
nErrcount = IG_image_dimensions_get(hIGear, &nWidth, &nHeight, &nBpp);
// ...
// Destroy the image
IG_image_delete(hIGear);
}
|
Remarks: