Back
Casper Boemann
cbr at boemann.dk
Mon Jul 26 15:06:26 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.
please see my upcoming reply to KisPixel.
> > 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...).
yes, on this we agree (ehh, booleans are also store as 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.
Ah, but that would require a new PixelRepresentation for each colormode,
which would require that all of Krita code be duplicated for each mode. And
not just templated. since handling the pixels would be done in different
maners.
best regards
Casper
More information about the kimageshop
mailing list