Code: Select all
convert input.tif -white-point 0.34567,0.35851 -colorspace lab output.tif
Any help would be very much appreciated.
Code: Select all
convert input.tif -white-point 0.34567,0.35851 -colorspace lab output.tif
http://ninedegreesbelow.com/photography ... ofile.html has "Table 4: sRGB D65 to ICC D50 Bradford Chromatic Adaptation Matrix". It also discusses issues that are beyond my own knowledge.Q. How can I convert D50 to D65?
A. The conversion from D50 to D65 requires a chromatic adaptation transform (CAT). Various methods are in common use - most of which employ a 3 x 3 matrix transformation. The coefficients of the matrix depend upon the illuminants one is converting to and from and the assumptions one wants to make about the best 'visual space' for doing this. The most popular among many users seems to be the linear part of what is known as the Bradford transform, though more recent transforms perform slightly better. [...]
Code: Select all
convert in.tiff -color-matrix \
"1.047886003 0.022918765 -0.050216095 \
0.029581782 0.990483518 -0.017078708 \
-0.009251881 0.015072607 0.751678134" out.tiff
Code: Select all
convert in.tif -colorspace xyz -color-matrix \
"1.047886003 0.022918765 -0.050216095 \
0.029581782 0.990483518 -0.017078708 \
-0.009251881 0.015072607 0.751678134" \
-colorspace lab out.tif
Code: Select all
convert in.tif -colorspace rgb -color-matrix \
"0.4360747 0.3850649 0.1430804 \
0.2225045 0.7168786 0.0606169 \
0.0139322 0.0971045 0.7141733" \
-colorspace lab out.tif
Code: Select all
cctiff -t1 -ir -p sRGB.icm input.tif output.tif
Code: Select all
convert output.tif txt:
Code: Select all
convert input.tif -intent relative -profile path2/sRGB.icm output.tif
Code: Select all
convert input.tif -profile path2/sRGB.icm -intent relative output.tif
Can't tell about IM implementation, but in theory "-intent" should do nothing when converting from RGB color model to LAB, because gamut of any RGB color space (sRGB, AdobeRGB, PhotoRGB, etc.) is a subset of LAB.tom_dl wrote:Should -intent change a cielab conversion (i.e. does the fact that it makes no difference imply it is a bug?)
Code: Select all
magick in.tif -colorspace xyz -color-matrix \
"1.0478112 0.0228866 -0.0501270
0.0295424 0.9904844 -0.0170491
-0.0092345 0.0150436 0.7521316" \
-colorspace lab out.tif
Code: Select all
magick in.tif -illuminant D50 -colorspace lab out.tif