possible bugs -colorspace IM 6.7.6.5 Q16
Posted: 2012-04-12T16:37:08-07:00
IM 6.7.6.5 Q16 Mac OSX Snow Leopard.
With the switch between RGB and sRGB, I do not think that round trip conversion are working properly.
Note that the rose: image verbose info reports Colorspace sRGB
This works fine: This should be fine before or after the swap.
convert rose: -channel R -separate tmpR.png
convert rose: -channel G -separate tmpG.png
convert rose: -channel B -separate tmpB.png
convert tmpR.png tmpG.png tmpB.png -combine rose_rgb_roundtrip00.png
This fails as expected because it is being converted to RGB This was fine before the swap.
convert rose: -colorspace RGB -channel R -separate tmpR.png
convert rose: -colorspace RGB -channel G -separate tmpG.png
convert rose: -colorspace RGB -channel B -separate tmpB.png
convert tmpR.png tmpG.png tmpB.png -colorspace RGB -combine rose_rgb_roundtrip0.png
This works, but should not because the final -colorspace is RGB and seems like it should be -colorspace sRGB
convert rose: -colorspace sRGB -channel R -separate tmpR.png
convert rose: -colorspace sRGB -channel G -separate tmpG.png
convert rose: -colorspace sRGB -channel B -separate tmpB.png
convert tmpR.png tmpG.png tmpB.png -colorspace RGB -combine rose_rgb_roundtrip1.png
This does not work, but it seems that it should since all colorspace conversions are sRGB
convert rose: -colorspace sRGB -channel R -separate tmpR.png
convert rose: -colorspace sRGB -channel G -separate tmpG.png
convert rose: -colorspace sRGB -channel B -separate tmpB.png
convert tmpR.png tmpG.png tmpB.png -colorspace sRGB -combine rose_rgb_roundtrip2.png
Similarly for a round trip via HSL
This works, but it seems that it should not because the final -colorspace is RGB
convert rose: -colorspace HSL -channel R -separate tmpH.png
convert rose: -colorspace HSL -channel G -separate tmpS.png
convert rose: -colorspace HSL -channel B -separate tmpL.png
convert tmpH.png -colorspace HSL \
tmpH.png -compose CopyRed -composite \
tmpS.png -compose CopyGreen -composite \
tmpL.png -compose CopyBlue -composite \
-colorspace RGB rose_hsl_roundtrip2.png
This fails, but it seems it should be working as the final -colorspace is sRGB
convert rose: -colorspace HSL -channel R -separate tmpH.png
convert rose: -colorspace HSL -channel G -separate tmpS.png
convert rose: -colorspace HSL -channel B -separate tmpL.png
convert tmpH.png -colorspace HSL \
tmpH.png -compose CopyRed -composite \
tmpS.png -compose CopyGreen -composite \
tmpL.png -compose CopyBlue -composite \
-colorspace sRGB rose_hsl_roundtrip3.png
Is this a bug? If not, please explain, because it is certainly not consistent terminology. And one should not have to insert -set colorspace to get around it, in my opinion.
With the switch between RGB and sRGB, I do not think that round trip conversion are working properly.
Note that the rose: image verbose info reports Colorspace sRGB
This works fine: This should be fine before or after the swap.
convert rose: -channel R -separate tmpR.png
convert rose: -channel G -separate tmpG.png
convert rose: -channel B -separate tmpB.png
convert tmpR.png tmpG.png tmpB.png -combine rose_rgb_roundtrip00.png
This fails as expected because it is being converted to RGB This was fine before the swap.
convert rose: -colorspace RGB -channel R -separate tmpR.png
convert rose: -colorspace RGB -channel G -separate tmpG.png
convert rose: -colorspace RGB -channel B -separate tmpB.png
convert tmpR.png tmpG.png tmpB.png -colorspace RGB -combine rose_rgb_roundtrip0.png
This works, but should not because the final -colorspace is RGB and seems like it should be -colorspace sRGB
convert rose: -colorspace sRGB -channel R -separate tmpR.png
convert rose: -colorspace sRGB -channel G -separate tmpG.png
convert rose: -colorspace sRGB -channel B -separate tmpB.png
convert tmpR.png tmpG.png tmpB.png -colorspace RGB -combine rose_rgb_roundtrip1.png
This does not work, but it seems that it should since all colorspace conversions are sRGB
convert rose: -colorspace sRGB -channel R -separate tmpR.png
convert rose: -colorspace sRGB -channel G -separate tmpG.png
convert rose: -colorspace sRGB -channel B -separate tmpB.png
convert tmpR.png tmpG.png tmpB.png -colorspace sRGB -combine rose_rgb_roundtrip2.png
Similarly for a round trip via HSL
This works, but it seems that it should not because the final -colorspace is RGB
convert rose: -colorspace HSL -channel R -separate tmpH.png
convert rose: -colorspace HSL -channel G -separate tmpS.png
convert rose: -colorspace HSL -channel B -separate tmpL.png
convert tmpH.png -colorspace HSL \
tmpH.png -compose CopyRed -composite \
tmpS.png -compose CopyGreen -composite \
tmpL.png -compose CopyBlue -composite \
-colorspace RGB rose_hsl_roundtrip2.png
This fails, but it seems it should be working as the final -colorspace is sRGB
convert rose: -colorspace HSL -channel R -separate tmpH.png
convert rose: -colorspace HSL -channel G -separate tmpS.png
convert rose: -colorspace HSL -channel B -separate tmpL.png
convert tmpH.png -colorspace HSL \
tmpH.png -compose CopyRed -composite \
tmpS.png -compose CopyGreen -composite \
tmpL.png -compose CopyBlue -composite \
-colorspace sRGB rose_hsl_roundtrip3.png
Is this a bug? If not, please explain, because it is certainly not consistent terminology. And one should not have to insert -set colorspace to get around it, in my opinion.