Problems with "-separate -combine" with non-RGB colorspace
Posted: 2010-12-21T17:22:57-07:00
I am getting unexpected results using "-separate" then "-combine"
when the colorspace is HSB.
I have reduced the problem case down to the following:
convert -size 10x10 xc:green -colorspace HSB -separate -combine k.png
I would expect that "k.png" would be the same color as "xc:green", but instead it
comes out as a bright unsaturated green.
When I look at the separate results from "-separate" (on a real image), they
look like kind of what I expect (though in 8-bit mode they don't come close to
combining back right -- all sorts of noisey artifacts).
If I insert and extra "-colorspace HSB" just before the "-combine", the output is
different but still not what I would expect. (I also tried an explicit "-depth 32",
but with no change).
The output from "convert -version" is:
Version: ImageMagick 6.6.6-3 2010-12-20 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP OpenCL HDRI
(I was trying this earlier with a q16 (?or maybe a q8) version that
clearly had range problems so I tried the HDRI version -- that was
better but still not near what I expect).
So, what's going on? Is this a bug (kind of looks like it to me),
or is there some important little detail that I am missing here?
Thank you.
when the colorspace is HSB.
I have reduced the problem case down to the following:
convert -size 10x10 xc:green -colorspace HSB -separate -combine k.png
I would expect that "k.png" would be the same color as "xc:green", but instead it
comes out as a bright unsaturated green.
When I look at the separate results from "-separate" (on a real image), they
look like kind of what I expect (though in 8-bit mode they don't come close to
combining back right -- all sorts of noisey artifacts).
If I insert and extra "-colorspace HSB" just before the "-combine", the output is
different but still not what I would expect. (I also tried an explicit "-depth 32",
but with no change).
The output from "convert -version" is:
Version: ImageMagick 6.6.6-3 2010-12-20 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP OpenCL HDRI
(I was trying this earlier with a q16 (?or maybe a q8) version that
clearly had range problems so I tried the HDRI version -- that was
better but still not near what I expect).
So, what's going on? Is this a bug (kind of looks like it to me),
or is there some important little detail that I am missing here?
Thank you.