[cairo] Size of PDF with lots of images
Adrian Johnson
ajohnson at redneon.com
Thu Jan 16 12:20:29 PST 2014
On 17/01/14 06:45, Simon Sapin wrote:
> On 16/01/2014 19:57, Adrian Johnson wrote:
>>> If your images were in a format that the PDF backend supports [2] (which
>>> includes JPEG but not PNG), you could use cairo_surface_set_mime_data()
>>> to have cairo store the original image data (almost) as-is in PDF,
>>> without re-compressing. Although I expect that lossy JPEG may not look
>>> nice for these specific images.
>> Yes, jpeg images are the most likely reason for the increase in size.
>>
>> I'm not sure what you mean by "lossy JPEG may not look
>> nice for these specific images". The jpeg data is stored exactly as
>> provided to cairo_surface_set_mime_data() so there will be no loss of
>> image quality.
>
> Behdad’s images are PNG here, not JPEG. They are computer-generated with
> sharp edges, the kind where JPEG does not do well.
>
I see two jpegs in his git repo.
More information about the cairo
mailing list