The last answer has disappeared?! Anyway, here's my reply (to magick):
I didn't want to sound negative. After all, I'm very grateful for ImageMagick - and for the possiblity to do operations in linear space (with sRGB files). With many programs, that's not possible at all.
I didn't say that some operation returns incorrect results now. But the operations have been reversed. It now seems that it was intended that way (still a bit unsure).
magick wrote:Now lets convert the assumed linear RGB earth light image to sRGB:
- convert earth_lights_4800.tif -colorspace srgb earth_sRGB.tif
Even if it were linear RGB - the command does nothing, as there is again the automatic conversion back to 'RGB' at the end (at least in my Win32 6.7.5-3 version). If one wants to save that 'sRGB' result, one has to use "-colorspace srgb -set colorspace rgb" here.
In my opinion, the earth lights image is already sRGB. I could try to prove that - but that's not the point.
Let's just assume that we have a sRGB image (with a sRGB color profile - though the metadata doesn't help here).
When one wanted to do operations in linear RGB with such an image, it was possible like that:
convert
srgb_input -colorspace sRGB
operations -colorspace RGB
srgb_output
That was valid at least from october 2010 up to recently (with the exception of some 6.7.1 subversions). Sometimes, one could even omit the final "-colorspace RGB".
Now, with v6.7.5-2 or 6.7.5-3, it has to be (for the same effect):
convert
srgb_input -set colorspace sRGB -colorspace RGB
operations -colorspace sRGB -set colorspace RGB
srgb_output
That's "all".
By the way, the "-colorspace sRGB" definition in the
documentation still shows the old equations (the equations for converting values from non-linear sRGB to linear sRGB):
if Rs ≤ .04045 then Rs=R/12.92 else Rs=((R+.055)/1.055)^2.4
if Gs ≤ .04045 then Gs=B/12.92 else Gs=((G+.055)/1.055)^2.4
if Bs ≤ .04045 then Bs=B/12.92 else Bs=((B+.055)/1.055)^2.4
(And there is a small typo. It probably should have read "if R ≤ .04045", not "R
s ≤ .04045". The same for the other lines. Otherwise, one would have to know the result before one can compute the result.

)