Re: RGB to CIELab transformation

Necko Nedjoni <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
After I had a chance to inform about the CIELab, I believe I should formulate the question differently.Given that I use cairo for pdf output, where the main coloring function is  cairo_set_source_rgb(cr, 1, 0.0, 1.0);I wonder could I output pdf file with colors that I primarily specify in CIELab space.So, given certain slice of the CIELab space, I would like to color the pdf file according to colorsdefined in the slice. Could this be handled by cairo? I got some suggestions on using alternative libraries, but, I suppose this is doable in cairo also.

> Date: Fri, 20 Jan 2012 11:55:17 +0100
> Subject: Re: [cairo] RGB to CIELab transformation
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> 
> On Fri, Jan 20, 2012 at 8:01 AM, Necko Nedjoni <[email protected]> wrote:
> > As a part of a larger project, I was recently assigned to investigate the
> > possibility of colorings
> > within our visualizations.
> > Namely, I came across the CIELab color space, which seems to be preferable
> > choice in the related
> > literature. The initial readings suggest that a conversion from
> > device-depended RGB is possible, and
> > I wonder how this could be achieved with cairo.
> 
> Converting a color in a device-dependent colorspace to a color in a
> device-independent colorspace is not actually a meaningful operation.
> You might assume that the RGB components are in a specific
> device-independent colorspace (given current cairo behavior I would
> suggest a linear rgb colorspace with the same primaries as sRGB or
> sRGB itself).
> You could then use normal color conversion routines, like those
> provided by LittleCMS.
> 
> >
> > The function I use currently (sample):
> >
> > cairo_set_source_rgb(cr, 1, 0.0, 1.0);
> >
> > Perhaps someone could share the conversion code.
> 
> I should have something that does it in my colorspaces branches.
> I will try to extract it to a standalone snippet.
> 
> Andrea
> 
> >
> > --
> > cairo mailing list
> > [email protected]
> > http://lists.cairographics.org/mailman/listinfo/cairo

--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.