IM 6.7.8.7 Q16 Mac OSX Snow Leopard
-contrast-stretch is not behaving as it used to before IM 6.7.7.8. It seems to be converting the image to linear space? Is this the desired behavior? To fix the problem I have to add -set colorspace RGB before -contrast-stretch.
Input:
IM 6.7.8.7
convert monet3.jpg -contrast-stretch 1%,1% monet3_cs_im.jpg
IM 6.7.4.10
im6 convert monet3.jpg -contrast-stretch 1%,1% monet3_cs_im6.jpg
IM 6.7.6.10
imo convert monet3.jpg -contrast-stretch 1%,1% monet3_cs_imo.jpg
possible bug -contrast-stretch IM 6.7.8.7 Q16
Re: possible bug -contrast-stretch IM 6.7.8.7 Q16
Contrast is behaving properly but differently from previous versions. You can recover the older behavior with
- convert monet3.jpg -colorspace RGB -contrast-stretch 1%,1% -colorspace sRGB monet3_cs_im.jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug -contrast-stretch IM 6.7.8.7 Q16
OK. Thanks.magick wrote:Contrast is behaving properly but differently from previous versions. You can recover the older behavior with
Contrast stretch analyzes the grayscale histogram of the image. Your image is in the sRGB colorspace, so it first removes the gamma function which as expected returns a different grayscale histogram than previous releases. Previous releases of IM assumed linear RGB so decompanding was not necessary.
- convert monet3.jpg -colorspace RGB -contrast-stretch 1%,1% -colorspace sRGB monet3_cs_im.jpg