[reportlab-users] Patch for inclusion of CMYK images as CMYK, not converted to RGB
Robin Becker
robin at reportlab.com
Tue Feb 3 05:45:51 EST 2009
Stevens, Ian wrote:
> The following patch to pdfimage includes unconverted CMYK images in the
> PDF to preserve colours. We have clients who pass their PDFs through a
> preflight tool before sending it to press and want all content to be
> CMYK. The patch uses PIL's Image.mode to decide whether to convert the
> image. We've been using this on our production servers since 2.1 without
> problem.
>
> Would it be possible to include this in the upcoming release?
>
Yes, I see no obvious problem here. I think it's more sensible to move the bpp
setting into the first part of the patch though.
We should probably think more about greyscale and other common image formats,
but not today.
As for CMYK in general we have had patches in the past related to CMYK in jpegs.
I notice in the code where we load a CMYK image from jpeg that we set a decode
array parameter which seems to reverse the sense of the colour values so instead
of running 0-1 they run 1-0 instead. Anyone clever here know why we have to do
that. I seem to remember when we started doing these patches that the tool (name
forgotten) which was creating the CMYK images required this transform (otherwise
all the colours were messed up).
> Thanks,
> Ian.
--
Robin Becker
More information about the reportlab-users
mailing list