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?
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.
BitsPerPixel = 3 * BitsPerComponent if the color is stored as RGB
BitsPerPixel = 4 * BitsPerComponent if the color is stored as RGB with an alpha channel (ARGB)
RGB is a random assumption ... this will hold for every color model using 3 components and may be a alpha chanel. It will be BitsPerPixel = BitsPerComponent if it is a gray scale image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With