Bug with export-background color if opacity=0

Bug #1430716 reported by Lebostein
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Medium
Unassigned

Bug Description

Inkscape 0.91, tested on Mac OS X and Windows XP, same problem:

If you export a png and the opacity is set to zero, then the export-background color is ignored! This is a very new behaviour with 0.91 and a bug in my eyes. I export some images with a specific background color and full transparency to modify the transparency later in my workflow. With the new version 0.91 I had problems now. Try this:

Provide a simple test.svg and execute this two command lines:

inkscape.com test.svg --without-gui --export-area-page --export-png=test_000.png --export-dpi=90 --export-background=#00ff00 --export-background-opacity=0
inkscape.com test.svg --without-gui --export-area-page --export-png=test_100.png --export-dpi=90 --export-background=#00ff00 --export-background-opacity=100

The command line output shows:

DPI: 90
Background RRGGBBAA: 00ff0000
Area 0:0:512:512 exported to 512 x 512 pixels (90 dpi)
Bitmap saved as: test_000.png

DPI: 90
Background RRGGBBAA: 00ff0064
Area 0:0:512:512 exported to 512 x 512 pixels (90 dpi)
Bitmap saved as: test_100.png

In both cases the background color is set to green (#00ff00). The first one with full transparency, the second one with 100/255 = #64 opacity. If you check the transparent areas with GIMP now, you see the background color for the first version is set to black (#000000) - this is only if you use Inkscape 0.91. With the older versions all seems OK.

Revision history for this message
Lebostein (lebostein) wrote :
Revision history for this message
su_v (suv-lp) wrote :

> If you export a png and the opacity is set to zero, then the
> export-background color is ignored! This is a very new behaviour with
> 0.91 and a bug in my eyes.

AFAIU this is a side-effect of an intentional change:
<quote>
* Canvas background color can be set without exporting it (background transparency is only used for export but not the canvas).
</quote>
http://wiki.inkscape.org/wiki/index.php/Release_notes/0.91#General

The change was implemented based on this earlier report:
* Bug #169623 (sf1492333) “Canvas color option”
  https://bugs.launchpad.net/inkscape/+bug/169623

tags: added: bitmap cli exporting
Revision history for this message
Lebostein (lebostein) wrote :

See the inkscape command line output! There is written:
"Background RRGGBBAA: 00ff0000"
This is definitely in my eyes. I expect a green and full transparent background. But what I get is 00000000.

I don't understand what this intentional change have to do with the command line export setting.

Revision history for this message
su_v (suv-lp) wrote :

Please ignore comment #2 - the difference between 0.48 and 0.91 is not related to bug #169623 (committed in rev 10784).

Based on test with older archived builds (on OS X 10.7.5) - before and after the merge of the new cairo-renderer branch (10325, 10326) - I can confirm that fully transparent pixels (background) in exported bitmap images are always black with alpha 100% with Inkscape's new renderer (rev >= 10326), ignoring the background color value as defined e.g. in the document properties. The same test cases exported as expected with the old renderer of rev 10325 (and as in 0.48).

The change is not limited to the command line (it also happens when exporting to PNG via GUI, with different document background colors set in the Document Properties dialog).

The color values of transparent pixels in the exported PNG images have been verified with the color picker in GIMP 2.9 (git master).

tags: added: regression
removed: cli
Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.92
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows 7, lp:inkscape/0.92.x rev. 15074.

Changed in inkscape:
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.