After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 413617 - Background color option for rsvg
Background color option for rsvg
Status: RESOLVED WONTFIX
Product: librsvg
Classification: Core
Component: general
2.14.x
Other All
: Normal enhancement
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-01 20:59 UTC by Tim Starling
Modified: 2007-03-01 21:10 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Tim Starling 2007-03-01 20:59:05 UTC
We at Wikimedia would like both librsvg and the rsvg command line utility to expose an option for PNG background colour. We are currently using a patch to force the background colour to white, which is necessary for correct printing from Firefox on Windows or Linux. In librsvg, it is implicitly hard-coded to black. 

For more details and our provisional patch, please see the Wikimedia bug report:

http://bugzilla.wikimedia.org/show_bug.cgi?id=4968
Comment 1 Dominic Lachowicz 2007-03-01 21:10:50 UTC
This should be possible with rsvg-convert, given a little effort. rsvg-view does something like this, but that's due to Netscape plugin limitations. For this to work, we'd probably have to composite a solid color over the cairo surface before handing it to rsvg_cairo_render().

I just wonder if this is a slippery slope sort of thing. I.e. will people want arbitrary images or gradients next? Couldn't this be done outside of librsvg using one of ImageMagick's command-line utilities, or a custom-written libpng-based program? And to be technically correct, you'd want to composite the PNG over the page's background color or image, not just "white".

Further, this is an issue for Firefox printing translucent images. This is a Firefox bug, not a librsvg bug. Hopefully this is fixed in the cairo-enabled Firefox3 builds due to cairo's smart fall-back rendering strategies.

If this is to be done at all, I would strongly prefer doing this as a post-processing step rather than complicating rsvg-convert. For these reasons, I think that is is a "WONTFIX" issue.

Thanks for the bug report.