Hi Martin,

 >What am I missing?

I have tried the conversion with icctrans and the numbers does match CS3 
and
Bruce Lindbloom's Web site  (BTW, this is an outstanding resource, I highly
recommended it). Overall it works to me. I wonder why are you getting such
values.

Using lcms-1.19:

$ icctrans -t3 -i*LabD65
LittleCMS ColorSpace conversion calculator - v3.3
Enter values, 'q' to quit
L*? 95
a*? 0
b*? -2
R=242.42 G=240.32 B=244.67
Enter values, 'q' to quit
L*? 55
a*? -37
b*? -50
R=0.00 G=151.71 B=217.82
Enter values, 'q' to quit
L*? 48
a*? 74
b*? -3
R=218.49 G=20.16 B=121.54
Enter values, 'q' to quit
L*? 89
a*? -5
b*? 93
R=255.00 G=222.58 B=0.00
Enter values, 'q' to quit
L*? 16
a*? 0
b*? 0
R=40.42 G=39.63 B=39.73

Checking with lcms-2.0, I got extra precision and negative
numbers, as it can run in unbounded mode. It matches
very well CS3 and CS4.

$ transicc -t3 -i*LabD65
LittleCMS ColorSpace conversion calculator - 4.0 [LittleCMS 2.00]
Enter values, 'q' to quit
L*? 95
a*? 0
b*? -2
R=239.2180 G=240.6768 B=244.4407
Enter values, 'q' to quit
L*? 55
a*? -37
b*? -50
R=-525.6947 G=151.1227 B=218.0212
Enter values, 'q' to quit
L*? 48
a*? 74
b*? -3
R=216.5063 G=11.5710 B=122.5150
Enter values, 'q' to quit
L*? 89
a*? -5
b*? 93
R=247.4448 G=224.1414 B=-69.9634
Enter values, 'q' to quit
L*? 16
a*? 0
b*? 0
R=39.7596 G=39.7596 B=39.7596

Regards
Marti.

> Hi
>
> I'm trying to create a transform of Lab D50 values to sRGB, using
> Guy's python bindings and lcms 1.18a.
>
> import littlecms as lcms
> import numpy as np
> 48
> # Set white point
> D65WhitePoint = lcms.CieColour([95.047, 100.000, 108.883], colourSpace='XYZ')
> # Create profile
> labD50Profile = lcms.Profile(colourSpace=lcms.PT_Lab)
> labD65Profile = lcms.Profile(colourSpace=lcms.PT_Lab, 
> whitePoint=D65WhitePoint)
> sRGBProfile = lcms.Profile(colourSpace=lcms.PT_RGB)
> # Create transform
> labD50_to_labD65_transform = lcms.Transform(labD50Profile, labD65Profile,
>     renderingIntent=lcms.INTENT_ABSOLUTE_COLORIMETRIC, inputDepth=0,
>     outputDepth=0)
> labD65_to_sRGB_transform = lcms.Transform(labD65Profile, sRGBProfile,
>     renderingIntent=lcms.INTENT_ABSOLUTE_COLORIMETRIC, inputDepth=0,
>     outputDepth=8)
> # Colours to be transformed
> labD50Colours = np.array([
>     [95, 0, -2],
>     [55, -37, -50],
>     [48, 74, -3],
>     [89, -5, 93],
>     [16, 0, 0]
>     ], dtype=np.float64)
> # Transform colours
> labD65Colours = labD50_to_labD65_transform.doTransform(labD50Colours)
> sRGBD65Colours = labD65_to_sRGB_transform.doTransform(labD65Colours)
>
> print sRGBD65Colours
>
> These are the resulting colours:
> [[252 236 212]
> [  0 149 191]
> [220  18 106]
> [253 220   0]
> [ 42  39  34]]
>
> Now, I expected something like the output from Photoshop and Bruce
> Lindblooms converter:
>
> PS CS3 Abs. col.
> 239, 241, 245
> 0, 151, 118
> 216, 11, 122
> 248, 224, 0
> 40, 40, 40
>
> Bruce Lindbloom (using Bradford)
> 240, 241, 244
> -111, 151, 218
> 216, 11, 123
> 247, 224, -40
> 40, 40, 40
>
> What am I missing?
>
> Martin Weberg
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Lcms-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lcms-user
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.425 / Virus Database: 270.14.73/2514 - Release Date: 11/19/09 
> 19:42:00
>
>   


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Lcms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to