pdfimage-conversionbits-per-pixel

How does PDF's BitsPerComponent translate to Bits Per Pixel for images?


My goal is to convert a PDF into an image (specifically in TIFF).

There is a PDF property called BitsPerComponent

And According to description on the page,

This property can take the value 1, 2, 4, 8 or 16. Other values are not supported in the PDF Specification

Does that mean, 1, 2, 4, 8 or 16 translates to bits per pixel in images?


Solution

  • Sounds more like bits per color component, where color component is one of either (Alpha)/Red/Green/Blue or Grey. So take the bits per component and multiply by the components per pixel to get bits per pixel. For example, if you're talking an RGB image you have 3 components. An RGB at 8 bit per component would be a 8 * 3 = 24bit per pixel image. If it was greyscale, e.g. one component, an 8 bit per component would be 8 bit per pixel.