[Gimp-developer] the Gimp lcms.c plug-in



I've been working on porting the Gimp lcms.c plug-in from using
LittleCMS version 1 to using LittleCMS version 2. This will make
possible high bit-depth ICC profile conversions.

I'm not a super-experienced c-coder, nor have I ever worked with the
lcms engine before. So I'm learning as I go. So far I've:
(1)compiled the existing Gimp lcms plug-in,
(2)modified the existing plug-in to use lcms2.h and attempted to
compile it (knowing it would fail)
(3)tracked down all the errors and warnings that result from the
differences between LittleCMS version 1 and LittleCMS version 2

My next steps will be to add a whole bunch of "print to screen"
commands to the current Gimp lcms.c plug-in so I can get a better
handle on the flow of the code, and then start rewriting (or perhaps
writing from scratch) the plug-in to use the LittleCMS v2 engine.

If anyone is curious, I've documented what I've done so far:

http://ninedegreesbelow.com/temp/gimp-lcms-1.html
http://ninedegreesbelow.com/temp/gimp-lcms-2.html

Comments, input is more than welcome.

I have a couple of big-picture questions:

Will Gimp be using as its internal working space some variant of
Microsoft's scRGB? What about:

Wikipedia: http://en.wikipedia.org/wiki/Scrgb
"scRGB is a wide color gamut RGB (Red Green Blue) color space created
by Microsoft and HP that uses the same color primaries and white/black
points as the sRGB color space but allows coordinates below zero and
greater than one. . . . the cost of maintaining compatibility with
sRGB is that approximately 80% of the scRGB color space consists of
imaginary colors."

"Two encodings are defined for the individual primaries: a linear 16
bit per channel encoding and a nonlinear 12 bit per channel encoding.
. . The 16 bit scRGB(16) encoding is the linear RGB channels converted
by 8192 x + 4096. Compared to 8-bit sRGB this ranges from about 1/2
the color resolution near 0.0 to more than 10 times the color
resolution
near 1.0."

That last sentence is a bit worrisome - losing resolution in the shadow areas.

It seems to me that you will always need ICC profiles, to convert an
image from whatever ICC color space profile it happens to be in, to
your internal working space, and from your internal working space to
the monitor profile, and from your internal working space back out to
whatever color space profile the person wants to use to upon exporting
to a non-xcf file. Yes? No?

Elle

-- 
http://ninedegreesbelow.com
Articles and tutorials on open source digital imaging and photography


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]