From db0d99f95542fb5ec5f864da6f11ff084f306e35 Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 1 Jan 2012 01:35:45 +0000 Subject: [PATCH] --- PerlMagick/t/filter.t | 2 +- coders/mat.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/PerlMagick/t/filter.t b/PerlMagick/t/filter.t index d733eb2a8..a8ba1c63a 100644 --- a/PerlMagick/t/filter.t +++ b/PerlMagick/t/filter.t @@ -123,7 +123,7 @@ testFilterCompare('input.miff', q//, 'reference/filter/Minify.miff', 'Minify', testFilterCompare('input.miff', q//, 'reference/filter/Modulate.miff', 'Modulate', q/brightness=>110,saturation=>110,hue=>110/, 0.08, 1.08); ++$test; -testFilterCompare('input.miff', q//, 'reference/filter/QuantizeMono.miff', 'Quantize', q/colorspace=>'gray',colors=>2,dither=>'false'/, 0.3, 1.03); +testFilterCompare('input.miff', q//, 'reference/filter/QuantizeMono.miff', 'Quantize', q/colorspace=>'gray',colors=>2,dither=>'false'/, 0.4, 1.04); ++$test; testFilterCompare('input.miff', q//, 'reference/filter/MotionBlur.miff', 'MotionBlur', q/'0x13+10-10'/, 0.003, 0.03); diff --git a/coders/mat.c b/coders/mat.c index 875e0e0f7..15a604e84 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -775,7 +775,10 @@ MATLAB_KO: ThrowReaderException(CorruptImageError,"ImproperImageHeader"); /* Image is gray when no complex flag is set and 2D Matrix */ if ((MATLAB_HDR.DimFlag == 8) && ((MATLAB_HDR.StructureFlag & FLAG_COMPLEX) == 0)) - image->type=GrayscaleType; + { + image->type=GrayscaleType; + image->colorspace=GRAYColorspace; + } switch (CellType) { -- 2.40.0