Created attachment 85226 [details] original file If you convert supplied pdf with -svg flag, you will get partially inverted svg image. If you convert to -png, then the result is ok. This looks like a bug somwhere in poppler.
Created attachment 85227 [details] svg file with inverted nested jpg image
Created attachment 85228 [details] Ok image, converted from original with -png flag
This is a cairo bug. Poppler doesn't treat cairo SVG output any differently to the other vector outputs.
The jpeg image is a CMYK image. None of the SVG viewers I tried support CMYK jpegs. I've updated the SVG surface to disable embedding of CMYK Jpegs so it will fallback to embedding an RGB PNG image.
Created attachment 85324 [details] Nested jpeg, base64 decoded from svg file
Dear Adrian! I've extracted jpg file from svg file, using base64 utility. It looks like it is not fault of svg viewer. File itselft is inverted. I tried Ifranview and windows picture viewer, both of them show it inverted. Can you comment this?
I opened your extracted jpeg with Windows viewer and Irfanview on Windows and eog and gimp on Linux. The image is not upside down. You are also looking at the old svg output. Cairo now embeds a png file for this pdf file.
I am sorry, I don't understand, there is some sort of confusion. The problem is not that image is upside down. The problem is that image is inverted. Original pdf has white background and extracted jpg has black ground. This is what I call inversion. Can you please confirm this?
The jpeg is in CMYK format. If the viewer doesn't understand CMYK (and most don't) it will interpret the CMY values as RGB. An approximate conversion between RGB and CMY is: C = 1 - R Y = 1 - G M = 1 - B So interpreting the CMY as RGB will appear to "invert" the colors.
Was this actually fixed? The issue seems to still be there in version 0.24.5.
(In reply to comment #10) > Was this actually fixed? > > The issue seems to still be there in version 0.24.5. It has been fixed in cairo git: http://cgit.freedesktop.org/cairo/commit/?id=f52165a7bb3de56fe2a06771f554f3997e176b94 A new version of cairo with this fix has not yet been released.
Created attachment 106742 [details] PDF which comes out with colours inverted in SVG
Even with the given patch, the PDF attached above comes out with colours inverted in SVG
*** Bug 80719 has been marked as a duplicate of this bug. ***
Problem is in poppler. See bug 80719.
*** Bug 93031 has been marked as a duplicate of this bug. ***
*** Bug 101699 has been marked as a duplicate of this bug. ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.