Hello Claudiu,

Littlecms implements two different strategies to deal with black  
preservation, in both cases, some colorimetric accuracy may be lost  
because the profile is used in a way that the vendor didn't intend  
originally, so don't expect the  accuracy to match the normal usage,  
otherwise black preservation may give you other benefits.

Keep also in mind this only works on CMYK-->CMYK transforms.

The first strategy is the simplest one. it works only when K input  
channel is nonzero and the other channels are zero. This is what you  
are using. You can reproduce the behavior by using transicc and two  
cmyk profiles. When you input (0, 0, 0, something) you will obtain (0,  
0, 0, whatever), rest of combinations will return same colors as the  
"normal" transform. This works very well to preserve black line art  
but may result in artifacts in images when using some profiles.


The second strategy is to redo completely the separation in a way the  
black *plane* is preserved. This is much more complex because the CMM  
has to compute the C, M, Y values to get same chromaticity but keeping  
proportions of K. Black channels are matched by using L*, so this  
approach does not work if K has a lot of chroma respect to media white.

You could use tifficc to see the differences. Take a CMYK image, and  
convert it to a different CMYK space by using all 3 options (normal,  
preserve K only and true K preservation). Then with Photoshop or any  
other suitable software, look the image *planes*. The image converted  
with true K preservation should have same organization on black plane  
that the original, the other two approaches completely messes out the  
K plane because the input profile converts to Lab, and the output  
profile redoes the separation from this Lab. You go 4 dimensions --> 3  
dimensions --> 4 dimensions and this mean there is a loss of  
information.

So you should not touch any code to get this working. Just pick the  
strategy more adequate to your needs. If this does not work, maybe the  
profile has a very small resolution input table or something else is  
wrong with it. I've done extensive check of the black preservation  
feature when using "good" profiles, and it works to me. Anyway this is  
software, so the possibility of bugs is always there. If you think  
there is a bug, try to create a test case that demonstrate the error  
and I will take a look.

Best regards
Marti

Quoting Claudiu Cebuc <cce...@gmail.com>:

> Hi Marti,
>
> I am trying to use the Black-ink-only preservation feature of the LCMS v2.
>
> Lets say I have an input image (say that the image was obtained by scanning
> a flyer that contained text and some other image, similar to your example
> on Black Preservation intents in the LCMS v2 tutorial) already formatted in
> CMYK (using SWOP profile), and I want to create a PreserveK LUT
> (DeviceLink) between SWOP and a Printer profile on the
> INTENT_PRESERVE_K_ONLY_RELATIVE_COLORIMETRIC and then convert the entire
> image through it.
> But if the input image contains some CMYK color that is close enough to a
> (0,0,0,k) gray color, say (0,0,3, k) in 8-bit, the conversion through the
> PreserveK LUT may produce visibly different output than the conversion of
> the color through the standard transform created with the same profiles on
> the corresponding ICC intent (RELATIVE_COLORIMETRIC).
> I believe this is by design, as the color's interpolation in the PreserveK
> LUT is going to use some (0,0,0,k) node(s) , which initially in the
> standard LUT was (c0, m0, y0, k0) , with the chances that c0, m0, and y0
> were pretty big actually ...
> I guess that such close to (0,0,0,k) gray colors are beyond the scope of
> the PreserveK functionality of the LittleCMSv2. Is this correct ?
>
> To properly convert all the colors the only option I know of is to actually
> move the PreserveK in the Interpolator : create a special PreserveK
> Interpolator and pass it the standard LUT and the K->K' Tone Curve (the
> K->K' that is computed in the PreserveK) and it will be the Interpolator
> who is going to do the PreserveK by using either the K->K' TC or the LUT:
>  - for any input (0,0,0,k) color use the K->K'
>  - for the rest of the colors use the standard LUT
>
> Do you have any other idea?
>
> Thank you,
> Claudiu.



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to