PDF Images

I never really gave it much thought but my recent research into the images supported by Xerox WorkCentres caused me to ponder the issue of DCTDecode. DCTDecode is used to encode an image using the JPEG compression, and is also a fully functional JPEG image, however, in PDF, one should consider the object as a TIFF bitmap, encoded using JPEG compression. I recently noticed the relevance of the notation in the Xerox 7655 specification:

It helps understand why JFIF is not a required format, as the PDF format itself contains the information that would typically be encoded in the APP14 tag.

A minor mystery laid to rest. Also note that the YCbCr tag is obviously inserted by some older software to help with managing the JPEG encoding, as JPEG itself failed to provide for ways to indicate the colorspace used. While PDF resolved this by encoding this in the PDF data   (/ColorSpace tag), JFIF was proposed to extend the original JPEG standard.

Now it makes all much better sense as the relevance of DCTDecode objects, which are JPEG encoded data streams used to encode a TIFF image.

The YCbCr comment tag is likely added to inform the PDF generator as to the nature of the DCTDecode object. It all starts to make sense

This also makes sense, realizing that Xerox uses the same DCTDecode object to encode LinearGray images which is a color space not supported by JPEG.

Wherever the data takes us…

2 thoughts on “PDF Images

  1. The YCbCr comment tag is likely added to inform the PDF generator as to the nature of the DCTDecode object. It all starts to make sense

    It’s possible. Another explanation is that it was from testing – it’s an easy way to verify that the Xerox autodetect software is correctly choosing between color and greyscale.

  2. When the embedded comment tag is YCrCb, the colorspace is set to DeviceRGB otherwise to DeviceGray. The software may be well enough integrated that it maintains the state of the image but given how the image is manipulated, downsamples, adding a comment makes sense. JPEG encoding had the problem that it did not specify the colorspace used and while JPEG FORMAT supports YCrCrb, an image in PDF encoded with JPEG can be color or B&W/Gray.

    Let me ponder on this some more. Remember that the DCTEncode filter does not include any colorspace information, something the JFIF standard was meant to correct. I will do some experiments here, to the extent possible, but I feel quite comfortable with my hypothesis..🙂

Comments are closed.