Get information about an image.
getImageInfo([in] int idx, [out] int *mask, [out] int *colorSpace, [out] int *width, [out] int *height)
This function retrieves information about the
idxth image on the page specified in the last call to
The following information is returned:
maskis a boolean flag, set to 1 for image masks and 0 for images - in PDF files, an "image mask" is a monochrome image which is drawn with the current fill color; the image mask itself does not include any color information (just opaque and transparent pixels).
colorSpaceis an integer indicating the color space type used by the image - see
getColorSpaceNamefor information on color space types. Image masks have no color information, so the colorSpace value is undefined and should be ignored if
heightdefine the size of the image, in pixels - this is the size of the raw image data found in the PDF file; the image may be scaled up or down (and cropped, rotated, sheared, etc.) when it is displayed on the page.
Dim mask As Long, colorSpace As Long, w As Long, h As Long ' scan the images on page 1 pdf.getImages 1 nImgs = pdf.numImages For i = 0 To nImgs-1 pdf.getImageInfo i, mask, colorSpace, w, h .... Next i