Frames and backgrounds around objects with svg filter effects

Bug #318134 reported by ivan louette
6
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Unassigned

Bug Description

1° I noticed the presence of strange frames around some objects wich have filter effects applied.

2° These drawings have also a slightly tinted background which wasn't there when I created them on a win32 build some months ago.

3° When I click on the zoom to drawing button the zoom includes the frames and backgrounds.

No problems if I open the same document in the non devel 0.46 release.

Here is a link to the svg file which gives the joined png : http://openclipart.org/media/download/ivan_louette/20375

Linux Build of 16 January

Kubuntu with KDE 4.1.4

Revision history for this message
ivan louette (ivan-louette) wrote :
Revision history for this message
ivan louette (ivan-louette) wrote :

The frame doesn't appear in exported bitmap.

However the slightly tinted background appears in exported bitmaps.

Revision history for this message
Preben S (prsodk) wrote :

The error in tinted background comes from the color matrix filter, where the background gets value #fefefe instead #ffffff using a unity matrix, and it is then amplified by the other filters.
A pure red #ff0000, also filtered with a unity matrix, comes out as #ff0101

I'm looking into the code now, but don't know if I have a chance to find it.

Revision history for this message
Preben S (prsodk) wrote :

There is added a constant 0.5 in statements like
... CLAMP_D_TO_U8( r*a00 + g*a01 + b*a02 + .5 );

The CLAMP_D_TO_U8 macro already contains a correct rounding function, so this correction is too much.

I don't understand how this error gave that tint, can somebody explain that?

Preben

Revision history for this message
ivan louette (ivan-louette) wrote :

Seems linked to "Composite"

Try this :

Filter 4050, select the first "Composite" in the list and the four other Filters select the second "Composite" in the list.

The try the settings :

XOR : Frame=1, Background=1
Over : Frame=1, Background=1
In : Frame=0, Background=0
Out : Frame=0, Background=0
Atop : Frame=0, Background+1

Revision history for this message
Preben S (prsodk) wrote :

The patch I have made is on the Color Matrix, it corrects the errors 100% both on display and export.

We just have to wait for somebody to check and commit it.

Preben

Revision history for this message
Preben S (prsodk) wrote :

I don't understand how this error gave that tint, can somebody explain that?

Oh. I understand now. The seen error occurs through the alpha channel.
After having corrected the error, I can simulate the previous error by setting the alpha constant to 0.002 (or all four constants).
I didn't think about the contribution from the alpha channel when I asked the question.

Preben

Revision history for this message
Niko Kiirala (kiirala) wrote :

Thank you for your patch, I've committed it in Inkscape SVN as revision 20539.

Changed in inkscape:
importance: Undecided → Medium
status: New → Fix Released
Revision history for this message
ivan louette (ivan-louette) wrote :

Sweet !!! Thanks a lot !!!

ivan

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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