(unless you have a special floating point HDRI version which is not typically used) See IM examples, Basics, HDRI
http://www.imagemagick.org/Usage/basics/#hdri
Second -colorspace LAB will convert from whatever the images current color
space is (Usally RGB) to LAB colorspace. that data in the image is modified!!!!
To just tell IM that the data is already in LAB format, but without converting
you would use -set colorspace LAB
See IM Examples, Basics, Color Space for details..
http://www.imagemagick.org/Usage/basics/#colorspace
Now I don't know a lot about the LAB colorspace. I didn't even know it could have negative values (which can't be represented normally).
However looking at the source code IM does RGB to LAB colorspace conversions by convertign RGB to XYZ then from there to LAB
RGBtoXYZ is defined as
X=0.4124240*r+0.3575790*g+0.1804640*b;
Y=0.2126560*r+0.7151580*g+0.0721856*b;
Z=0.0193324*r+0.1191930*g+0.9504440*b;
whcih are foaling point values
Also as RGB is positive XYZ will be a positive value
XYZ to Lab is defines is a much more complex way.
involving some poweroff modifiers and some negatives, so I supose
it could produce negative values.
My own test
Code: Select all
convert xc:'RGB(64,165,214)' -colorspace LAB -depth 8 txt:-
Hmm the bet idea is to check if going from RGB to LAB and back to RGB
produces something sensible...
Code: Select all
convert xc:'RGB(64,165,214)' -colorspace LAB -colorspace RGB -depth 8 txt:-
are correct.
As such I am not certain how this relates to or differs from the TIFF version, or where ever your original version with negative values.