Page 1 of 1

Updated proposal: Add adobe sGray colorspce: closer to sRGB!

Posted: 2013-10-16T15:53:26-07:00
by Dabrosny
At Fred's suggestion, the Gray colorspace can continue to behave as it does for script compatibility reasons.

Edit: Another reason that Glennrp pointed out for retaining (rather than replacing/redefining) Gray is that Gray also serves as a more generic grayscale colorspace (e.g. I would say whose interpretation may or may not resemble a "gray" or lightness or based on sRGB, e.g. could be the b or U channel of Lab or LUV).

PROPOSAL: add a new colorspace sGray so that

Code: Select all

convert image.miff -colorspace sGray
should act in such a way as to produce a grayscale image that *literally* emits same *amount* of light as measured in candelas at each pixel as the original color image did (when both are displayed using the same typical and/or correct software and hardware of course).

Update: The result will look very similar to Adobe sGray, which is their grayscale version of sRGB (see below).

What many people expect in a grayscale version of a color image is not arbitrary, but rather it should be a gray shade that doesn't appear darker or lighter (to a typical human) than the original color.

If we can agree in principle that it might be useful to be able to accomplish this, then we can discuss the mechanics of how to achieve this goal. Please don't say "it can't be done uniquely so I don't want to try" -- if you agree that it would be useful *if* it could done uniquely, or at least in a way that's closer to accomplishing this goal than the current default of -colorspace gray is, then I can explain how.

This is just one example so doesn't prove anything by itself, but I believe these images that Fred recently made illustrate what the current -colorspace gray (middle) and proposed -colorspace sGray results (bottom) will be, each in comparison separately to the original color "rose:" (top). The bottom one should look more like the original color image than does the middle one (at least to a typical trichromat human using accurate viewing software and hardware).
fmw42 wrote:Here are the results of processing the rose: image with the fix for gamma in IM 6.8.7.1

Image

nonlinear grayscale:
imbh convert rose: -colorspace sRGB -grayscale rec709luma rose_luma.png
Image
fmw42 wrote:imbh convert rose: -colorspace sRGB -grayscale rec709luminance -set colorspace RGB -colorspace sRGB rose_luminance.sRGB3.png
Image
Update: the result just above will be produced by my proposal without using color profiles, but looks very similar to the result of the following ICC conversion in IM:

Code: Select all

im convert rose.png -set profile sRGB.icc -profile sGray.icc rose.sGray.png
[/size]Where sRGB.icc is from Argyll CMS and sGray.icc is from Adobe. (I don't yet have a good place to host the image.)

The middle image appears to be the same as I get today with with "convert rose: -colorspace sRGB -colorspace gray rose_colorspacegray.png", which makes sense if rec709luma is indeed today's default.

(Eventually I would also like to add a linear grayscale colorspace, e.g. "Luminance" or "LinearGray" or "Cie1931LinearY", but that can be a separate discussion as it isn't as much of a priority for me if gamma=1 on a Gray image is able to elicit most of the same behavior from IM.)

Re: Updated proposal: Add adobe sGray colorspce: closer to s

Posted: 2013-10-17T15:35:31-07:00
by fmw42
I don't yet have a good place to host the image
If you need to add additional images, then the best way is to upload them to any free web hosting service, such as dropbox, and then put a link here to them.