Posted: 2006-11-15T15:08:55-07:00
GrayQuantum does not initialize the colormap indexes. Use IndexQuantum instead or use GrayQuantum followed by a SetImageType() to grayscale.
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=7811