pdfGetImageDecodeRange

Get the number of components per pixel for an image.
void pdfGetImageDecodeRange(PDFHandle pdf, int idx, int component, double *low, double *high)
This function returns the component decode range (which is most commonly 0..1 or 1..0, but can be completely different) for the idxth image on the page specified in the last call to pdfGetImages.
C:
double low, high; int nImgs, i, j, mask, colorSpace, w, h, nComps; pdfGetImages(pdf, 1); nImgs = pdfGetNumImages(pdf); for (i = 0; i < nImgs; ++i) { pdfGetImageInfo(pdf, i, &mask, &colorSpace, &w, &h); nComps = pdfGetImageNumComponents(pdf, i); printf("image %d: %s with %d components\n", i, pdfGetColorSpaceName(colorSpace), nComps); for (j = 0; j < nComps; ++j) { pdfGetImageDecodeRange(pdf, i, j, &low, &high); printf(" decode: %g %g\n", low, high); } }
pdfGetImages
pdfGetNumImages
pdfGetImageNumComponents