[Digikam-devel] extragear/graphics/digikam/libs/dimg/filters

Gilles Caulier caulier.gilles at kdemail.net
Thu Feb 23 06:40:04 GMT 2006


Le Mercredi 22 Février 2006 23:58, Marcel Wiesweg a écrit :
> > > digikam from trunk: rounding error of BCG modifier
> > >
> > > With the current algorithm, even setting a gamma of 1.0 would create
> > > changes, (x / 255.0) * 255.0 might be slightly less than x, so casting
> > > this value to int would result in an error of 1.
> > > I hope using the round() function is a correct fix for this,
> > > at least the 1.0 value now creates a proper x=y mapping.
> >
> > Fine for me.
> >
> > If you have any time, HSLModifier don't work properly with 16 bits image
> > (i suspect a problem too with 8 bits image).
> >
> > Can you take a look my comments in source code and give me your viewpoint
> > ?
>
> As to 16 bit, there is an integer overflow in setLightness and
> setSaturation, 65535^2 = 2^32, so something like (i * (65535 + value) will
> wrap around for larger values of i.
> I think I have a fix for this, but now I have managed to break it even more
> thoroughly, for 8bit as well :-)
> I will work on this tomorrow.

Ok. thanks (:=)))

Gilles



More information about the Digikam-devel mailing list