Color adjustment filters

Boudewijn Rempt boud at valdyas.org
Thu Aug 11 18:32:36 CEST 2005


I'm trying to find out where exactly we're making unwarranted assumptions
about color models and so -- and I've found the following bit of code in
void KisColorAdjustmentFilter::process(...):

                KisQuantum d = srcIt[ configPC->channel( i ) ];
                Q_INT32 s = configPC->valueFor( i );
                if( d < -s  ) 
			dstData[ configPC->channel( i ) ] = 0;
                else if( d > QUANTUM_MAX - s)
			dstData[ configPC->channel( i ) ] = QUANTUM_MAX;
                else 
			dstData[ configPC->channel( i ) ] = d + s;


So, this should be changed in a function that applies a correction to a 
certain channel (and the filter should be changed to loop over the color
channels, not just the depth of the pixel).

What shall we call this function, and what would be the best type for the
adjustment? It's an int now, is that okay?

(I'm working on a proposal to make the colormodels a little more svelte and at 
the same time the set of pixel methods they implement extensible and 
flexible. I got a little angry after all.)

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20050811/4e6c50e7/attachment.pgp


More information about the kimageshop mailing list