Is "-colorspace" usage changed again in IM 6.7.6-5 Q16?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Is "-colorspace" usage changed again in IM 6.7.6-5 Q16?

Post by henrywho »

Okay -> convert test.jpg -distort Resize 25% -quality 95% test_out1.jpg
Okay -> convert test.jpg -gamma 0.4545454545454545 -distort Resize 25% -gamma 2.2 -quality 95% test_out2.jpg
Too dark -> convert test.jpg -colorspace RGB -distort Resize 25% -colorspace sRGB -quality 95% test_out3.jpg

.... tested using Win32 Portable and Win64 DLL versions.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is "-colorspace" usage changed again in IM 6.7.6-5 Q16?

Post by fmw42 »

RGB and sRGB were swapped as far as I know only at IM 6.7.5.5

But I will defer to the IM developers in case it accidentally got switched back.
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: Is "-colorspace" usage changed again in IM 6.7.6-5 Q16?

Post by henrywho »

Also too dark -> convert test.jpg -colorspace sRGB -distort Resize 25% -colorspace RGB -quality 95% test_out4.jpg
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Is "-colorspace" usage changed again in IM 6.7.6-5 Q16?

Post by anthony »

henrywho wrote:Also too dark -> convert test.jpg -colorspace sRGB -distort Resize 25% -colorspace RGB -quality 95% test_out4.jpg
With the current IM, This devolves into the operations...

Code: Select all

convert {input} -distort Resize 25% -colorspace RGB  {result}

In other words you resize in sRGB and saved after converting from sRGB to RGB. Whcih would be too dark.

the right way to do colorspace corrected resize is now...

Code: Select all

   convert {input} -colorspace RGB -distort Resize 25% -colorspace sRGB  {result}
The gamma correctly resize has not changed.

See the updated IM Examples, Reszie with corrections
http://www.imagemagick.org/Usage/resize ... colorspace
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: Is "-colorspace" usage changed again in IM 6.7.6-5 Q16?

Post by henrywho »

That's case (3) in my first post, where I got a dark image.

Actually, I suspect that it is a bug in the (various) Windows build of 6.7.6-5 Q16.
Post Reply