Grayscale and Quantize on PSD generates invalid file

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
Posts: 12
Joined: 2019-05-21T01:06:38-07:00
Authentication code: 1152

Grayscale and Quantize on PSD generates invalid file

Post by usemagi »

Code: Select all

var fi2 = new FileInfo(@"....\190132LCZ.psd");
IMagickImage image2 = new MagickImage(fi2);

image2.Resize(new MagickGeometry(-1, 200));
// following 2 lines causes to created invalid image
image2.Quantize(new QuantizeSettings
	Colors = 256,
	ColorSpace = ImageMagick.ColorSpace.Gray

image2.Depth = 8;
image2.ColorSpace = ColorSpace.Gray;
image2.Format = MagickFormat.Psd;

This code creates invalid psd that later causes this - ... 38#p166838

Original file ... sp=sharing

The result file ... sp=sharing 7.14
Post Reply