[Solved] Pale results with Quantize

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
Alan Hadley
Posts: 48
Joined: 2010-03-31T12:17:55-07:00
Authentication code: 8675308

[Solved] Pale results with Quantize

Post by Alan Hadley »

I am using ImageMagick-6.7.9-Q16 on Windows, the Magickcore interface. I am adding one function at a time to my GUI interface for IM, I am now working on Quantize.

No matter what values I put into the QuantizeInfo structure (Colourspace, Treedepth etc.) the results of Quantize always appear lighter than the original image with less colour saturation too.

Is there a problem with my usage, I am starting with a true colour image, or is there a problem with IM?

Alan
Last edited by Alan Hadley on 2012-10-18T23:11:38-07:00, edited 1 time in total.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Pale results with Quantize

Post by anthony »

It is very hard to say, without a small example. Also what versions of IM you are using. and even the commands you are using. As you talk about structures, I gather you are doing this from a programming interface?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Pale results with Quantize

Post by glennrp »

Looks like some problem with RGB versus sRGB colorspace. Are you writing PNG files?
Alan Hadley
Posts: 48
Joined: 2010-03-31T12:17:55-07:00
Authentication code: 8675308

Re: [Solved] Pale results with Quantize

Post by Alan Hadley »

Yes, it was a colourspace problem. I was setting the colourspace value of the Image structure to RGB without checking that it did not have a valid value first, and if it had leaving it alone.

Alan
Post Reply