Color Spaces - RGB, CMYK, YUV

Boudewijn Rempt boud at valdyas.org
Sat Jun 4 14:42:48 CEST 2005


On Saturday 04 June 2005 14:22, Bart Coppens wrote:
>
> > > Now this would be possible with krita, for the most part of it. If you
> > > know how, Krita would be able to display YUV frames, and you would be
> > > able to draw on them. As far as I know, the main problem is that at the
> > > moment, that the paint brush still works only in RGB,
> >
> > What does tie it to RGB?
>
> The fact that the color chooser and so all operate on RGB I think.
>

Well, actually I think that the brush dabs are already in the correct 
colorspace, so that's not the problem. It's the colorchoosers that are 
problematic, but I have long wanted to replace the use of QColor to a 
combination of a byte array and a reference to a color strategy, so every 
color chooser can deliver results in its native mode, and every client can 
use the color strategy to ask for conversion.

> > Generally I think we could replace QColor with some KisColor class, which
> > would have similar interface but be more universal.
>
> Yes, I think that's the idea. I think we had a KisColor class at one point,
> but we abandoned it, does anyone now if that is correct (and why)?

First there was koColor, a simple union of all color models in use in one 
class. I did once have a KisColor class but it wasn't complete. But it's not 
much different from a KisPixelRO.

> Now I think a KisColor class could have something like an 'internal'
> colorspace (with possibly an associated profile). Then if you request to
> paint on RGB, it internally converts from its own colorspace to the target
> colorspace. That way, you can have specific YUV color choosers, so you
> wouldn't need to convert to RGB (except when displaying the image to
> screen, of course).

Yes, exactly.
-- 
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/20050604/a8f99e3d/attachment.pgp


More information about the kimageshop mailing list