PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com _____________________________________________________________
> I wanted to share with everyone a solution to an interesting > Lab color space problem that I discovered empirically, but cannot > explain why it works. It doesn't work! (Except in this one case, by good luck). > The trio (0xA0, 0, 0) should produce a gray color I think so. > (Start of code) 4 0 obj <</Type /XObject /Subtype /Image /Width 2 /Height 2 /ColorSpace [/Lab <</WhitePoint [1 1 1] /Range [-128 127 -128 127] >>] /BitsPerComponent 8 >> stream 0xA0 0 0 0xA0 0 0 0xA0 0 0 0xA0 0 0 endstream endobj > Through trial and error, I discovered that the *a and *b values > have to be XOR'ed with 0x80, and then it works fine. No, you are missing the vital step of using the Decode array. What, you say, there isn't a decode array. Well, actually there always is: the image samples (which may be 1,2,4,8 or now 16 bits) have to be converted into the target range using the Decode array in every case, and the Decode array has a different default for each Color Space. Just as RGB values, which might be in the range 0 to 255, have to be decoded into the valid range 0.0 to 1.0, so Lab values have to be decoded - you are lulled into a false sense of security because the values seem to be in range. Aandi To change your subscription: http://www.pdfzone.com/discussions/lists-pdfdev.html
