-----Original Message----- From: Jon Cruz [mailto:jon@...18...] Sent: 22 February 2011 08:57 To: Engelen, J.B.C. (Johan) Cc: Inkscape-devel List Subject: Re: [Inkscape-devel] New: Grayscale display mode
On Feb 21, 2011, at 2:57 PM, Jon Cruz wrote:
So in general I think having a few modes with 'baked in' color ICC
profiles instead of raw code to do a conversion would be more flexible and more useful to the end users. Also it would probably be easier to finish the last 20% of getting the code correct.
Let me know if you need a hand poking at that LCMS code. As a first step you can probably create a gray profile and use lcms calls to replace the 0.33 0.59 0.11 function implementation with lcms which
will
take care of the whole
convert-to-linear-then-do-the-work-then-convert-
back munge of math.
The CMS color picker code uses lcms to convert values one RGB triplet at a time, so you can use it that way. Or you can use a single lcms call to convert an entire buffer at once. That would probably be a
very
simple first step, and would be not nearly as complex as starting by changing the UI approach you have, etc.
Before I started, I also thought about doing this in a more general way, but opted for the quick solution first. Now that it works, and I know a bit better where all the rendering happens, I can start working on making a more versatile solution. The next two weeks are busy though...
Ciao, Johan