[reportlab-users] Re: cmyk-images

Robin Becker robin at reportlab.com
Wed Aug 17 09:08:57 EDT 2005


Jürgen R. Plasser wrote:
> Hi,
> 
......
>>
>>
>> OK it seems as though JPEG CMKY is not totally standardized. I can get 
>> the result to work properly by adding /Decode [1 0 1 0 1 0 1 0]
>>
>> Trouble is I don't know what the required test would be to determine 
>> whether this should be added or not.
> 
> 
> I have just tried to reproduce Robin's suggestions and it works by 
> inserting /Decode [1 0 1 0 1 0 1 0] by editing the resulting pdf file 
> directly. Otherwise the image seems to be inverted, the same effect 
> happening to rgb images when i insert the /Decode command.
> 
> Is there any other solution to this problem in reportlab by now? I need 
> to handle rgb and cmyk images, if necessary in one and the same document.
> 
> There've been some threads on this list about cmyk images. I came to the 
> conclusion that it should not be to much work to get it running.
> 
> Jürgen
> 
> 

Jürgen the latest code in svn does this transformation automatically. Basically 
I changed the code so that we now add the /Decode under certain circumstances. 
My problem is that I don't know under what circumstances a CMYK jpeg actually 
needs it; the /Decode stuff is mentioned in passing by some Adobe docs, but 
Jpegs aren't only produced by Photoshop/Illustrator. I have a copy of Graphics 
File Formats, but it's silent on these and probably many other issues.
-- 
Robin Becker


More information about the reportlab-users mailing list