Hi Mark,

I see. The formatter selection code does revert
your types to the generic formatter instead of
using the Lab template. As a result Lab space
is encoded in range 0..1.0 instead of 0..100,
-127...+128.

Ok, it may be regarded as a bug, and I have it
already fixed. Will commit the changes on git
probably on monday, as right now the server
where I keep the sandbox is down.

Thanks for reporting.
Marti



Quoting Mark <[email protected]>:

> Hi,
>
> I'd like to use 16 byte float pixels for RGA, Lab and XYZ conversions 
> - so I tried defining these:
>
> #define TYPE_XYZA_FLT          
> (FLOAT_SH(1)|COLORSPACE_SH(PT_XYZ)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4))
> #define TYPE_LabA_FLT          
> (FLOAT_SH(1)|COLORSPACE_SH(PT_Lab)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4))
> #define TYPE_RGBA_FLT          
> (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4))
>
> But it looks like something is wrong.
>
> Using the LCMS built in formats (TYPE_RGB_FLT, TYPE_XYZ_FLT, 
> TYPE_Lab_FLT) I get the following:
>
> sRGB -> XYZ -> sRGB
> 1.000000, 1.000000, 1.000000
> 0.964200, 1.000000, 0.824900
> 1.000000, 1.000000, 1.000000
>
> sRGB -> Lab -> sRGB
> 1.000000, 1.000000, 1.000000
> 100.000000, 0.000008, -0.000008
> 1.000000, 1.000000, 1.000000
>
> Lab -> XYZ -> Lab
> 100.000000, 0.000000, 0.000000
> 0.964200, 1.000000, 0.824900
> 100.000000, 0.000008, 0.000008
>
>
> Using the formats I defined (TYPE_XYZA_FLT, TYPE_LabA_FLT, TYPE_RGBA_FLT):
>
> sRGB -> XYZ -> sRGB
> 1.000000, 1.000000, 1.000000, 0.000000
> 0.482107, 0.500008, 0.412456, 0.000000
> 1.000000, 1.000000, 1.000000, 0.000000
>
> sRGB -> Lab -> sRGB
> 1.000000, 1.000000, 1.000000, 0.000000
> 1.000000, 0.501961, 0.501961, 0.000000
> 1.000000, 1.000000, 1.000000, 0.000000
>
> Lab -> XYZ -> Lab
> 100.000000, 0.000000, 0.000000, 0.000000
> 307598.437500, 321873.781250, 271461.625000, 0.000000
> 100.000000, -0.000001, 0.000000, 0.000000
>
> Any ideas what I'm doing wrong?
>
> Thanks
> Mark
>
>
>



------------------------------------------------------------------------------

_______________________________________________
Lcms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to