Re: [Lcms-user] Device space float ranges
An ICC-based CMM for color management
Brought to you by:
mm2
From: John J. <j.j...@nt...> - 2023-05-04 17:08:17
|
Many thanks Marti, John On 04/05/2023 15:46, mar...@li... wrote: > Hi, > > Problem is if I change this 100 scaling, I break photoshop notation, and many people is using that. > > A neat solution would be writing a formatter plug-in to replace double encoding to the scale you need. You could copy & paste the formatters code you want to change from cmspack.c and modify it. > > You probably not need all the variants, so you could simplify the code and get some throughput boost. > See some examples on plug-ins manual, "Formatters plug-in" > > Regards > Marti Maria > The LittleCMS Project > https://www.littlecms.com > > > >> -----Original Message----- >> From: John Jefferies via Lcms-user <lcm...@li...> >> Sent: Thursday, May 4, 2023 2:13 PM >> To: lcm...@li... >> Subject: [Lcms-user] Device space float ranges >> >> Hello Marti, >> I have a system where all colour spaces are device spaces (PT_GRAY, PT_RGB, >> PT_CMYK, PT_MCH*), and all colour values are floats in the range of 0-1. I >> therefore need a formatter to handle this, so I use this >> formatter: >> cmsFormatterForColorspaceOfProfile(hProfile, sizeof(float), TRUE) >> >> It appears that lcms assumes that the client's float colour values are in the >> range 0-100 if colour space is an IsInkSpace(). The problem then becomes >> how to marshal my float values into and out of lcms. It appears that in client >> code, I have to ensure the values are *100 or /100 as appropriate if the colour >> space I have is an ink space. >> >> For my purposes, that's a bit daft. Firstly, IsInkSpace() isn't an exported >> function so the client code has to duplicate the function itself. Secondly, it's >> rather inefficient. Thirdly, the client code is uglier than it needs to be. Finally, >> the assumed range of 0-100 isn't documented anywhere that I could find; >> apologies if it is somewhere blindingly obvious. >> >> Is there any other way to use float values in the range 0-1? >> >> Regards + many thanks >> John >> >> >> >> _______________________________________________ >> Lcms-user mailing list >> Lcm...@li... >> https://lists.sourceforge.net/lists/listinfo/lcms-user |