-
1. Re: Problem in displaying image contained in a pdf file
lrosenth Jul 6, 2014 8:17 AM (in response to rha906)As we don't know your code, your imaging library or anything else that you are doing - and my crystal ball is on the fritz - we can't really help :(.
However, given that you are talking about CMYK the first question is about whether you a re working on a CMYK surface or converting to RGB? If converting, how?
Second, what filter is applied to the image? DCT? Flate? Other?
Third, are you considering any DecodeParms on the image?
Fourth, is the image indexed or not?
And the list goes on..
-
2. Re: Problem in displaying image contained in a pdf file
rha906 Jul 6, 2014 8:26 PM (in response to lrosenth)Following are the answers of your questions in sequence:
1. I am reworking on CMYK surface, is there any useful way to convert CMYK to RGB, I tried several formulas but couldn't do it.
2. Flate filter is applied on it.
3. Predictor 15 is the entry used from DecodeParams
4. I dont know whether the image is indexed or not, how can it be known??
Please suggest whats the issue.
Regards,
Ali
-
3. Re: Problem in displaying image contained in a pdf file
lrosenth Jul 7, 2014 5:22 AM (in response to rha906)The proper way to convert CMYK->RGB is to use an ICC-based color transformation via a CMM (color management module), however a single algorithmic version is provided in the PDF standard (ISO 32000-1:2008).
Seems like you need to read over the standard some more if you don't know how to tell if an image is indexed.
Beyond that - we'd need to see the image/PDF...
-
4. Re: Problem in displaying image contained in a pdf file
rha906 Jul 7, 2014 9:16 PM (in response to lrosenth)But my question is that, given the above information, can you please tell me why I need to subtract the whole image (each component of every pixel) from 255 while remaining in the CMYK color space, also there is no Decode entry in the image dictionary.
Regards
-
5. Re: Problem in displaying image contained in a pdf file
lrosenth Jul 8, 2014 5:05 AM (in response to rha906)No, I can't, because I don't know how your code operates :(. I don't know how your canvas code works. I also don't know anything more about the image in question.
If you want to post the PDF in question, since it sounds like a single PDF that is causing an issue, we can investigate it.
-
6. Re: Problem in displaying image contained in a pdf file
mattivore Jul 21, 2014 3:59 PM (in response to rha906)There's not enough information here to give a definitive answer. However, you may want to see if the ColorTransform key is defined with a value of 1 for the image, for those images that are coming out reversed. I believe I've run into this before with handing CMYK-encoded DCT streams that were really stored as YUVK format.


