Back

Cyrille Berger cyb at lepi.org
Mon Jul 26 14:37:24 CEST 2004


> What I *fundamentally* don't like is the exposure of the channel data to
> anyone but the colorstrategy.

but filters can't be put inside a colorstrategy.

> Yes if anyone can explain how this should be accomplished, with the
> QUANTUMS exposed I'm all ears.

in tile manager data are stored in uchar* (uchar is the smallest data 
division, except for boolean, which are stored in uchar...).

a double equal four uchar, imagine we have a colorstrategy with 3 double 
channels, and one uchar channel. The KisPixelRepresentation will look like 
this :

KisPixelRepresentationMyColorStrategy : public  KisPixelRepresentation 
{

KisChannelDouble channel1() { return  KisChannelDouble( (double*) data ); };
KisChannelDouble channel2() { return  KisChannelDouble( (double*) ( data + 
sizeof(double) ) ); };
KisChannelDouble channel3() { return  KisChannelDouble( (double*) ( data + 
2*sizeof(double) ) ); };
KisChannelUChar channel4() { return  KisChannelUChar ( data + 3 
*sizeof(double) ); };


private:
 uchar* data;

}

KisChannelSmthg look like  the current KisQuantum.

-- 
--- Cyrille Berger ---


More information about the kimageshop mailing list