getImageNumComponents
Get the number of components per pixel for an image.
getImageNumComponents([in] int idx, [out, retval] int *nComps)
This function returns the number of pixel components (which depends on
the color space being used) for the
idx
th
image on the page specified in the last call to getImages
.
For most color spaces, the number of components is determined by the color space - DeviceGray has one component, DeviceRGB has three components, etc. But some color spaces, e.g., DeviceN, can have variable numbers of components.
VB:
Dim low As Double, high As Double
pdf.getImages(1)
nImgs = pdf.numImages
For i = 0 To nImgs-1
nComps = pdf.getImageNumComponents(i)
' image i has nComps components
For j = 0 To nComps-1
pdf.getImageDecodeRange(i, j, low, high)
' image i, component j has range low .. high
....
Next j
Next i