Grayscale Linear vs Non-linear documentation Bug

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 22079
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Grayscale Linear vs Non-linear documentation Bug

Post by fmw42 » 2017-10-21T19:43:08-07:00

At https://legacy.imagemagick.org/script/c ... gement.php and https://www.imagemagick.org/script/color-management.php
Normally, the conversion to separate each channel of an sRGB color image produces separate linear grayscale images. However the same concept can be applied, if it is desired to keep the separate channels as non-linear grayscale. For example, the following produces non-linear grayscale channels.

convert myimage.png -set colorspace RGB -separate myimage_channels_%d.png
To me this documentation is unclear as to what is being discussed and demonstrated. It does not read correctly if one is trying to convert non-linear image and separate into linear channels. So it could be a remnant from the time that grayscale images were linear and RGB and SRGB were swapped.

Thus it seems to me that linear and non-linear should be swapped in three places. Also -set colorspace RGB should be changed to -colorspace RGB (otherwise it just sets the colorspace to linear but does not change the pixel data to linear)

As of IM 6.8.6.0 (viewtopic.php?f=4&t=21269#p104277), it should read:
Normally, the conversion to separate each channel of an sRGB color image produces separate non-linear grayscale images. However the same concept can be applied, if it is desired to keep the separate channels as linear grayscale. For example, the following produces linear grayscale channels.

convert myimage.png -colorspace RGB -separate myimage_channels_%d.png

User avatar
magick
Site Admin
Posts: 10690
Joined: 2003-05-31T11:32:55-07:00

Re: Grayscale Linear vs Non-linear documentation Bug

Post by magick » 2017-10-22T05:33:02-07:00

We fixed the docs. Wait 24 hours for the updates to mirror.

Post Reply