From: John J. <j.j...@nt...> - 2023-05-04 12:40:48
|
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 |