If your source color space is not XYZ anywa, but some working space, then the 
basic idea would be that you supply a profile for your source color space and a 
profile for the destination color space, and let the CMM do the transformation 
between these color spaces.

If you want to achieve a special gamut mapping/clipping, you basically have two 
opportunities:

1. Use a CLUT profile to describe the destination color space. Unlike matrix 
profiles, the B2A tables of CLUT profiles can fully control how PCS colors 
(including out of gamut ones) are mapped to device space. Whatever mapping you 
put into the B2A tables of the profile, the CMM will apply it. Of course you 
need a profile then, whose B2A tables are set up according to your desire...

2. Alternatively you could add an abstract profile to the transformation chain 
(between source and destination profile) which does the desired gamut 
mapping/clipping.

Best Regards,
Gerhard


Am 09.09.2012 22:17, schrieb Wenzel Jakob:
Hi,

thank you for your suggestions. The "working color space -> XYZ ->
lcms2" route sounds sensible -- I will give that a try.

Best,
Wenzel

On 09/09/2012 07:03 AM, Marti Maria wrote:
Hi,

So what you really are asking for is a way to input out of gamut values
to a profile. The answer is "not directly, but may be other ways".
Please note this limitation comes from ICC spec, not because the CMM.
Usual profiles are limited to 16 bits, and despite there is a floating
point extension, there is no guarantee that a given profile would
implement that. Up to date I've seen no single commercial profile
supporting this, only prototypes.

At that point, I wonder why you want the Rec709 primaries. If you are
coming from a wider space, why not to use a profile from original space
and avoid all the out of gamut issue completely? Ok, I understand there
are reasons to use such space, maybe you want to use Rec709 as a working
space to do blending etc.

My recommendation would be to use a wider space for input, forcing all
values to be in-gamut of this space. XYZ would be a nice choice, its
gamut is practically infinite in the ICC encoding. You could just apply
a 3x3 matrix to go from your Rec709 space to XYZ, and then feed the XYZ
values to a cmsCreateXYZProfile() builtin. You need no tone curves, just
a 3x3 matrix.

If you don't like the 3x3 matrix multiplication, LittleCMS has an
extension (the "unbounded mode") that allows those negative numbers on
certain profiles. The built-ins, for example. In 2.4 a linear profile
would allow this as well. But anyway this is an extension of lcms and it
would not work if you change the CMM. I wrote a paper about those issues
at the color imaging conference couple of years ago CIC, see the paper
here:
http://www.littlecms.com/CIC18_UnboundedCMM.pdf

Hope this helps
Regards
Matri


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to