I found a minor issue with how gamma values are written to PNG files. After a -gamma operation, the PNG encoder takes this into account when writing the gAMA chunk. But the value is inverted; after applying -gamma 2.2 to a linear image it will write 2.2, while it should write .45455.
Some test cases:
Code: Select all
convert test.exr test.png
There are however programs out there which ignore the gAMA chunk, so I tried to produce a PNG file with the usual gamma correction (1 / 2.2).
Code: Select all
convert test.exr -gamma 2.2 test.png
It's possible to work around like this:
Code: Select all
convert test.exr -gamma 2.2 +gamma .45455 test.png
The colorspace option works as expected:
Code: Select all
convert test.exr -colorspace sRGB test.png
Roeland