Page 1 of 1

Greyscale too dark

Posted: 2012-06-24T02:24:24-07:00
by stupid
I'm using ImageMagick-6.7.7-8-Q16-windows-static

The -colorspace Gray and -modulate 100,0 are both returning images that are much too dark.


s.

Re: Greyscale too dark

Posted: 2012-06-24T06:15:47-07:00
by magick
Add -colorspace sRGB to your command line.

Re: Greyscale too dark

Posted: 2012-06-24T07:14:09-07:00
by stupid
Hi, magick.

It worked well. Thanks for that; I can't see the rest of the site from where I am. A friend emails me:

"Auto convert images in the grayscale colorspace to sRGB"

from the changelog. Is this standard now?


s.

Re: Greyscale too dark

Posted: 2012-06-24T07:31:42-07:00
by magick

Re: Greyscale too dark

Posted: 2012-06-24T07:43:16-07:00
by stupid
Got it. Thanks for your trouble.


s.

Re: Greyscale too dark

Posted: 2012-06-26T03:48:17-07:00
by stupid
Just a further question on the colour space theme.

This:

-evaluate PoissonNoise 2 -modulate 100,0

gives a very dark result; but this:

-random-threshold 0x100% -modulate 100,0

gives the correct result without any translation of the colour space.

Is the darkened output with -evaluate PoissonNoise 2 to be expected? (I know the degree of graininess is not the same, btw.)


s.

Re: Greyscale too dark

Posted: 2012-06-26T18:31:28-07:00
by anthony
You probably should convert the image to linear RGB colorspace first.

convert {input_image} -colorspace RGB ..... -colorspace sRGB {output_image}

The original problem is basically because auto-convert back to sRGB is turned off for grayscale images.
In IMv7 their is a definate difference between one channel grayscale, and multi-channel grayscale that
the auto-convert can make use of, but IMv6 does not have that difference (all images have at least 3 channels in memory).

Re: Greyscale too dark

Posted: 2012-06-27T06:24:47-07:00
by stupid
What I'm querying is the inconsistency:

noise generation + desat = dark
random thesholding + desat = no change in gamma

-modulate 100,0 shouldn't involve colour space changes; it's just a desaturation op. Or so I thought.


s.