[reportlab-users] How can I insert CMYK JPG in CMYK pdfdocument ?
Brower Jason
Jason.Brower at kone.com
Tue Jul 28 01:06:34 EDT 2009
As far as I know yes, there is such a thing as cmyk jpeg. At least I have done the conversions. You can use imagemagick with adobe's provided tools to make the conversions in imagemagick and linux.
But I could be wrong, I am too busy to google today.
Regards,
JAson
-----Original Message-----
From: reportlab-users-bounces at reportlab.com [mailto:reportlab-users-bounces at reportlab.com] On Behalf Of Chuck Martin
Sent: 27/07/2009 16:36
To: Support list for users of Reportlab software
Subject: Re: [reportlab-users] How can I insert CMYK JPG in CMYK pdfdocument ?
I believe that jpg does not support cmyk. When I want CMYK I use tif.
Since there is no perfect mapping from RGB to CMYK, my images start out as eps with CMYK colors. Then I use ghostscript to convert them to tif. If your images start out as RGB bitmaps, then there is less benefit in converting them to tif.
Chuck
----- Original Message ----
From: KLEIN Stéphane <stephane at harobed.org>
To: reportlab-users at reportlab.com
Sent: Monday, July 27, 2009 8:16:03 AM
Subject: Re: [reportlab-users] How can I insert CMYK JPG in CMYK pdf document ?
Le Mon, 20 Jul 2009 12:33:07 +0000, KLEIN Stéphane a écrit :
> Hi,
>
> I produce CMYK PDF document and I need to insert CMYK JPG file in my
> document.
>
> I've one simple example :
>
> ::
>
> from reportlab.pdfgen import canvas
> from reportlab.lib.units import cm, mm from reportlab.lib.pagesizes
> import A4 from reportlab.pdfgen.pdfimages import PDFImage
>
> c = canvas.Canvas( "test.pdf", pagesize = A4) c.drawString(200, 100,
> "hello.pdf")
>
> img = PDFImage("image_test_cmjn.jpg", 100, 500, 300, 300)
> img.drawInlineImage(c, preserveAspectRatio = True)
>
> c.showPage()
> c.save()
>
> "image_test_cmjn.jpg" is a CMYK image. When I look test.pdf, this image
> appear converted in RGB.
>
> How can I fix this issue ?
I fixed my issue with :
$ convert myfile.jpg -resize 100% myfile.jpg
The "convert" is imagemagick utils.
I don't understand why this fix my issue, maybe error in my jpg...
Regards,
Stephane
_______________________________________________
reportlab-users mailing list
reportlab-users at reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users
_______________________________________________
reportlab-users mailing list
reportlab-users at reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users
More information about the reportlab-users
mailing list