Created attachment 102020 [details] PDF file contains a jpeg image in DeviceN colorspace The attached PDF file contains a jpeg image in DeviceN colorspace, whose alternate colorspace is DeviceRGB. After converted to svg, the image's displayed color is inverted, i.e. white becomes black, and black becomes white. Other output format like png looks correct. I build poppler from 8a5e59c6ea7ccd0ecbdb4b37bf3fe4e74e1c0e8e.
Created attachment 102021 [details] the output of pdftocairo -svg, color is inverted
*** This bug has been marked as a duplicate of bug 68965 ***
Created attachment 106787 [details] [review] only embed mime data for gray/rgb/cmyk colorspaces
Created attachment 106818 [details] [review] only embed mime data for gray/rgb/cmyk colorspaces Update to fix a leak.
Created attachment 107384 [details] [review] only embed mime data if decode map is identity This patch fixes another issue with setMimeData(). The mime data should not be embedded if the decode map is anything other than [0 1 0 1 ... ]
Comment on attachment 107384 [details] [review] only embed mime data if decode map is identity Review of attachment 107384 [details] [review]: ----------------------------------------------------------------- ::: poppler/CairoOutputDev.cc @@ +2719,5 @@ > + // only embed mime data if image decode map is identiy > + for (i = 0; i < colorMap->getNumPixelComps(); i++) { > + if (colorMap->getDecodeLow(i) != 0.0 || colorMap->getDecodeHigh(i) != 1.0) > + return; > + } Looks good, maybe we could add a helper method for this, and we don't need the comment to explain it. something like: if (!colorMapHasIdentityDecodeMap(colorMap)) return; Or something similar.
Created attachment 107470 [details] [review] only embed mime data if decode map is identity
Comment on attachment 107470 [details] [review] only embed mime data if decode map is identity Review of attachment 107470 [details] [review]: ----------------------------------------------------------------- Perfect, thanks!
Pushed.
*** Bug 93031 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.