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 603550 - Masking with solid white incorrectly creates transparency
Masking with solid white incorrectly creates transparency
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2009-12-02 02:32 UTC by Mike Lewis
Modified: 2016-12-12 21:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Rendering of mask_test.svg with rsvg-convert (4.42 KB, image/png)
2009-12-02 02:32 UTC, Mike Lewis
  Details
This is how it should look (rendered with inkscape) (5.54 KB, image/png)
2009-12-02 02:34 UTC, Mike Lewis
  Details
This is the SVG test case (2.09 KB, image/svg+xml)
2009-12-02 02:35 UTC, Mike Lewis
  Details
Patch to correct alpha issue (2.12 KB, patch)
2009-12-03 23:44 UTC, Mike Lewis
none Details | Review

Description Mike Lewis 2009-12-02 02:32:49 UTC
Created attachment 148875 [details]
Rendering of mask_test.svg with rsvg-convert

If you make a mask with a rect with the color #ffffff or "white" and 1 fill-opacity, the mask will actually make it semi-transparent.  Mask it several times, and it will make it more transparent.

Attacked SVG should be solid black in colored areas, but as rendered (see png) with librsvg-convert, it is not so solid.
Comment 1 Mike Lewis 2009-12-02 02:34:01 UTC
Created attachment 148876 [details]
This is how it should look (rendered with inkscape)
Comment 2 Mike Lewis 2009-12-02 02:35:20 UTC
Created attachment 148877 [details]
This is the SVG test case
Comment 3 Mike Lewis 2009-12-03 23:44:00 UTC
Created attachment 149056 [details] [review]
Patch to correct alpha issue

Here's a patch to correct it. I tried to include a detailed comment to describe what the "magic" numbers were doing.

It looks like there were some math issues originally, so this should fix it.
Comment 4 Federico Mena Quintero 2016-12-12 21:21:25 UTC
Thank you for the patch and the detailed comment!  I've included this with your test as commit 29eddba37f8bc1d1686f41fa8eded9c1ce003d7d in the rustification branch.