API problems with krita
Cyrille Berger
cberger at cberger.net
Thu Feb 1 19:08:05 CET 2007
> > I'm not sure how other raster image applications
> > handle this stuff: I could
> > image we could create a "KisChannel" paint device
> > that returns iterators that
> > only give back one channel. I should look at how the
> > Gimp implements its
> > channels, or ask pippin for good literature. Let's
> > do that right away
> > anyway :-)
>
> Um, I like it. Maybe have the ChannelIterator have
> toUInt8, toUInt16, and toFloat accessors.
That's a bad idea if you want bit depth independence, unless we only provides
the toFunctions and not the fromFunctions, and that the value returned by the
toFunctions is never ever copied to the paint device
> I did a brief google search and found these:
> http://docs.gimp.org/en/gimp-concepts-basic.html
> http://gug.sunsite.dk/docs/Grokking-the-GIMP-v1.0/node43.html
Little reminder: most of the gimp filter only works on RGBA 8bit images. In
krita, you can never assumes that the paintdevice is RGBA 8bit !
And I also don't really see the advantage of iterating only on a channel
instead of iterating on the pixel of the image and only consider the channels
you are interested in ?
(Note, that iterating on one channel is easily doable with a "fake"
colorspace, that would advertise only one channel, and a pixelsize of the
real size of the pixel)
--
Cyrille Berger
More information about the kimageshop
mailing list