Page 1 of 1
[WITHDRAW]possible bug -channel rgb switch -contrast-stretch
Posted: 2012-05-03T11:09:11-07:00
by fmw42
The switch (-channel rgb) for -contrast-stretch to process each channel separately is does not seem to be working in IM 6.7.6.9 beta and also at least as far back as IM 6.7.4.10
These two examples show no differences.
convert rose: -contrast-stretch 2x2% show:
convert rose: -channel rgb -contrast-stretch 2x2% show:
Same with other images I have tested.
Re: possible bug -channel rgb switch -contrast-stretch
Posted: 2012-05-03T11:35:18-07:00
by magick
These two commands are equivalent:
- convert rose: -contrast-stretch 2x2% show:
convert rose: -channel rgb -contrast-stretch 2x2% show:
The default channels, when not explicitly specified, is RGB. If the image had an alpha channel and you specified -channel rgba you would expect some differences due to the alpha channel being stretched.
Re: possible bug -channel rgb switch -contrast-stretch
Posted: 2012-05-03T14:07:17-07:00
by fmw42
magick wrote:These two commands are equivalent:
- convert rose: -contrast-stretch 2x2% show:
convert rose: -channel rgb -contrast-stretch 2x2% show:
The default channels, when not explicitly specified, is RGB. If the image had an alpha channel and you specified -channel rgba you would expect some differences due to the alpha channel being stretched.
Please check with Anthony. It used to work to process each channel separately. See the port image examples for contrast-stretch with and without -channel rgb under
http://www.imagemagick.org/Usage/color_ ... ar-stretch
From that page:
"However, if "-channel RGB" is specified, then each channel will be stretched separately and the result will depend upon the end bins in each channel. If they are different, then a color shift will be produced between the individual channels in the resulting image."
Re: possible bug -channel rgb switch -contrast-stretch
Posted: 2012-05-03T14:40:20-07:00
by fmw42
correction. the rose image is not a good test. It seems to working fine using the port image. So my script failure is due to some other factor.
The last two should be the same and different from the first.
convert port2.png -contrast-stretch 2x2% show:
convert port2.png -channel rgb -contrast-stretch 2x2% show:
convert port2.png -channel rgb -separate -contrast-stretch 2x2% -combine show:
Re: [WITHDRAW]possible bug -channel rgb switch -contrast-str
Posted: 2012-05-08T21:17:55-07:00
by anthony
See normalize examples.
http://www.imagemagick.org/Usage/color_mods/#normalize
If you get yellow in the test image, each channel was normalized seperatally. This happened when channels was set to anything except the 'default' either -channels RGB or -channel ALL
I have a list of such operators that need to be checked over in IMv7 when I get the main API finished.