You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Thomas E Deweese <th...@kodak.com> on 2000/11/06 21:40:03 UTC

[Commit] GaussianBlurOp, MorphologyOp, RasterRable

I have committed the above files.

The GaussianBlurOp now fixes the bug everyone was seeing with
   usage.svg There still appears to be a bug where the shadow floats a
   bit This doesn't happen with the logo, and I'm pretty sure this
   isn't a regression.  

   The bug was only triggered if the horizontal stdev is <= 2 and the
   vertical stdev > 2.  I always start batik with a file I want to
   test, so I didn't notice the 'obvious' bug.

   This will not fix the 'darkening' problem Stephane noted.
   
MorphologyOp

   No longer depends on JDK 1.3.

   Imported most of the Alph Premult work I did for GaussianBlurOp.

   The Darkness problem persist however I believe I know the root
   cause, we end up mixing alpha and premultiplied color values from
   different areas.  You can't do this.  I'm still trying to work out
   how this should be handled since I believe the operation is to be
   performed on premult data...

RasterRable

   In the processes of figuring out that JDK 1.2 doesn't support PNG I
   noticed that I never removed my images from the media tracker.  I
   now do this which should prevent the holding of images indefintely.

Re: [Commit] GaussianBlurOp, MorphologyOp, RasterRable

Posted by Vincent Hardy <vi...@eng.sun.com>.
> MorphologyOp
> 
>    No longer depends on JDK 1.3.
> 
>    Imported most of the Alph Premult work I did for GaussianBlurOp.
> 
>    The Darkness problem persist however I believe I know the root
>    cause, we end up mixing alpha and premultiplied color values from
>    different areas.  You can't do this.  I'm still trying to work out
>    how this should be handled since I believe the operation is to be
>    performed on premult data...

Well, this is what the spec says, but I think may be an error (I should
have brought it up with the SVG WG, but it fell through the cracks). 
The reason we did it on non premultiplied is that if you want the 
min or max of R, for example, factoring in alpha makes the result 
something which is the max of alpha*R, which is different from 
(max of R)*(max of alpha) (e.g., use r1=255 a1=128, r2=128 a2=255).
In premultiplied, the max would be r=128, a=255). In non-premultiplied, 
the result would be r=255 a=255. 

What do you think?
V.