[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    KImageEffect work and screenies (was Re: Binary compatibility
From:       Mosfet <dan.duley () verizon ! net>
Date:       2003-05-25 12:34:59
[Download RAW message or body]

Cool beans :)

On Friday and Saturday I was working on animated GIFs and I recalled I also 
have to fix some errors in the effects I ported from ImageMagick to 
KImageEffect. 

Most notably some of the effects based on pixel neighborhoods had incorrect 
data on the edges. Things like blur and edge detect, (which is used a lot), 
calculate pixels by looking at surrounding ones. I was incorrectly wrapping 
around the edges - which would use incorrect data and made the edges look 
funny. This has been fixed. 

Also, each method using pixel neighborhoods used to have it's own code to 
iterate through a block of pixels and apply an algorithm. This has been 
replaced with a general convolve function. Much, much easier to maintain 
since there is really only one place apt to have bugs.

Finally,  ImageMagick uses 16 bits per color component, (64bits per color), 
while QImage uses only 8, (for 32bits per color). When originally porting I 
reduced the bit depth from 16 to 8 of things I really didn't have to such as 
accumulators and matrixes. This meant the effects didn't look as nice as 
ImageMagick. In some cases it's even better to upscale a pixel component to a 
unsigned short, do the algorithm, and downscale it again because the result 
is far nicer. In particular edge detect and all the effects based on it, 
(charcoal, emboss, etc...), look much different.

Now there isn't any visible difference between the ImageMagick and 
KImageEffect effects, at least for the ones I have changed so far :)

I got a couple more to do, (ie: oil paint), but here are some screenshots:

http://www.mosfet.org/effects/


On Sunday 25 May 2003 04:16 am, Stephan Kulow wrote:
> Am Sunday 25 May 2003 05:06 schrieb Mosfet:
> > Just to make sure, it says it's okay to add new static data members. I
> > assume it's also okay to add static public methods?
> >
> > Specifically I've been doing all the KDE lib stuff I've been wanting to
> > get done and did a lot of enhancements to KImageEffect, but I need to add
> > some new static methods with additional parameters.
>
> static methods are not much more than static functions. They do not affect
> binary compatibliity as long as they're only added
>
> Greetings, Stephan
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic