Inkscape/cairo still recompressing png images when saving to pdf?

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
cornus
Posts: 1
Joined: Thu Nov 12, 2015 6:32 am

Inkscape/cairo still recompressing png images when saving to pdf?

Postby cornus » Thu Nov 12, 2015 8:29 am

I know that in previous versions of Inkscape there was a shortcoming that caused bitmaps/raster images to be recompressed when exporting a drawing containing them into pdf format. This was supposedly fixed in the latest stable release (0.91). However, when I'm trying to export an svg file containing a png image (roughly 70 KiB) into pdf, the resulting pdf file will be over 300 KiB in size. I am not able to find any other explanation than that the original png is decompressed, then recompressed with a less efficient encoding before saving it into the pdf.

The svg file producing this behavior is as an attachment. If it matters, I'm using the portable version of Inkscape 0.91 on winXP sp3.

Surprisingly, jpg images seem to be saved into pdf files just fine, without recompression or any other processing. I confirmed this by examining the pdf produced by Inkscape with a hex editor, and found that it contained a bit-by-bit copy of the original jpg. Unfortunately the same is not true for png images.

Could it be that I have missed something, eg. a well-hidden setting that needs to be set a certain way to avoid the recompression? Or have I bumped into a genuine anomaly in Inkscape's behavior?
Attachments
background2.svg
(97.2 KiB) Downloaded 203 times

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Inkscape/cairo still recompressing png images when saving to pdf?

Postby Grobe » Mon Nov 16, 2015 8:00 am

I beleive the following settings should help:

  • Preferences (Strl+Scift+P)
  • Bitmaps
  • Import

Than make sure that settings is:
  • Bitmap scale (image-rendering) = "None (auto)"
  • Default import resolution = 90
  • Override file resolution = Yes
Attachments
exportPNG.pdf
Example PDF - bitmap copy of dialog boxes mentioned in this thread.
(42.37 KiB) Downloaded 254 times
:lol:


Return to “Discuss Software Issues”