Inkscape PNG transparency display appearance does not match export and other standard applications
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
Unassigned | ||
Bug Description
Hi Inkscape people!
I've been trying to create a design that ultimately will be sent to the printers, and this design uses transparent bitmaps to add a bit of texture. I'm finding that Inkscape's drawing area and the Export Bitmap's PNG agree in appearance, but saving as a Cairo PNG or a PDF gives really obviously different results that ruin any visual balance of transparency achieved within the Inkscape drawing area. I'm using Inkscape 0.46+devel r21524, built Jun 9 2009.
Also, loading the Inkscape SVG into Scribus 1.3.5svn gives more prominent transparency effects just like the Cairo exports.
I've got a test case SVG file here (embedded texture - 1.8MB): http://
And a comparison of the different outputs here (0.8MB): http://
The texture overlays the whole area with a transparency value of 50% and becomes far more prominent (though noticably still transparent) once passed through Cairo PNG or PDF export filters. Can a nice Inkscape developer out there please confirm and explain this behaviour, and offer a possible workaround or advice?
Thanks very much!
> pbhj's reply:
>
> I'm not a dev, sorry.
>
> It looks like the Cairo PNG and PDF are rendering at about 75% the overlay.
> I think this is actually your problem. Why can't you just use the normal
> (correctly rendered) exported PNG for the print? It can be embedded in a
> PNG file but there's no real reason why the printer can't use it except lack
> of technical expertise on their behalf, IMO.
>
> Interestingly my file manager preview (Dolphin, KDE4) and Firefox 3.0.11
> render the SVG file as in the "wrong" renderings. Strange.
>
> Fixing, well as it's the opacity that there's a problem with if you create your
> plasma (in The GIMP?) with the opacity you need and > then in Inkscape
> display it as 100% O then it should work in PDFs (does for me) and I guess
> in Cairo PNG too. An alternate is to do a bitmap copy which will semi-flatten
> the plasma overlay (making the Inkscape opacity 100% and folding the
> opacity into the PNG bitmap copy itself).
>
> Excellently asked question - wish everyone asked so well!
>
> HTH.
>> Bug report follows:
Thanks for the suggestion that I should try altering the PNG transparency. I did, and the result with the same plasma texture was this: http://
The result from this test suggested that Inkscape's idea of 50% transparency in an object and most everyone else's idea of 50% transparency aren't the same.
So I reduced this even further: 2 black PNG squares next to each other. See the SVG and bitmap exported PNG for the details:
http://
http://
It is important to note that a rectangle object created in Inkscape and set to black at 50% transparency matches the correct appearance of a 50% transparent PNG imported and left at 100% object transparency in Inkscape.
So the bug is this: The OBJECT transparency of an imported PNG does not match the OBJECT transparency of a standard vector object such as a rectangle. The PIXEL transparency of an imported PNG correctly matches the OBJECT transparency of a standard vector object. Whether you have 50% pixel transparency and 100% object transparency, or 100% pixel opacity and 50% object transparency when importing a PNG should give the same on screen appearance.
This bug applies to Inkscape's drawing area and bitmap export. Saving as PDF or Cairo PNG will correctly give two squares with identical mid grey appearance when viewed in Adobe Reader 9 and the GIMP respectively.
tags: | added: bitmap |
Confirmed on Ubuntu 9.04, Inkscape rev. 21690.