cberger at cberger.net
Mon Apr 10 10:18:48 CEST 2006
I am working on a new colorspace for drawing pen-and-ink illustration.
But I came across a big problem. The rendering part of the colorspace
need to know the coordinate of a pixel. I mean the color of a pixel
depends of the color and substance of this pixel and of the position
of the pixel in the image.
So I have three solutions to solve this problem :
- change of the API to have toQColor(), convertToQColor receive the
coordinate (but this is a big change for something not really wanted)
- store the coordinate of the pixel as two channels... (ugly, isn't it ?)
- have convertToQColor display the "raw" data (it would still be a
nice idea if convertToQColor has the coordinate anyway) and use an
adjustement layer to convert the raw data to the final render.
My favorite solution is the number #3, it allow more flexibility (you
can choose the renderer, I have at least two in minds, you can watch
the raw data), but I have two problems, one : isn't it a problem if
the adjustement layer isn't created when the pen-and-ink layer is
created ? And two : is it a good idea if a filter change the
colorspace of the paintdevice ?
More information about the kimageshop