Greyscale too dark

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
stupid
Posts: 51
Joined: 2010-02-12T07:30:34-07:00
Authentication code: 8675308

Greyscale too dark

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Greyscale too dark

Post by magick »

Add -colorspace sRGB to your command line.
stupid
Posts: 51
Joined: 2010-02-12T07:30:34-07:00
Authentication code: 8675308

Re: Greyscale too dark

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Greyscale too dark

Post by magick »

stupid
Posts: 51
Joined: 2010-02-12T07:30:34-07:00
Authentication code: 8675308

Re: Greyscale too dark

Post by stupid »

Got it. Thanks for your trouble.


s.
stupid
Posts: 51
Joined: 2010-02-12T07:30:34-07:00
Authentication code: 8675308

Re: Greyscale too dark

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Greyscale too dark

Post 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).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
stupid
Posts: 51
Joined: 2010-02-12T07:30:34-07:00
Authentication code: 8675308

Re: Greyscale too dark

Post 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.
Post Reply