From c4a6f8af9143bcdefa161fc98b55e7fbfeddc390 Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 21 Sep 2011 22:36:11 +0000 Subject: [PATCH] --- coders/miff.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/coders/miff.c b/coders/miff.c index c53d8d854..bbde89987 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -1209,7 +1209,8 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, packet_size=(size_t) (quantum_info->depth/8); if (image->storage_class == DirectClass) packet_size=(size_t) (3*quantum_info->depth/8); - if ((image->type == BilevelType) || (image->type == GrayscaleType)) + if ((image->type == BilevelType) || (image->type == GrayscaleType) || + (image->type == GrayscaleMatteType)) packet_size=quantum_info->depth/8; if (image->matte != MagickFalse) packet_size+=quantum_info->depth/8; @@ -1217,6 +1218,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, packet_size+=quantum_info->depth/8; if (image->compression == RLECompression) packet_size++; +printf("%d\n",packet_size); length=image->columns; length=MagickMax(MagickMax(BZipMaxExtent(packet_size*image->columns), LZMAMaxExtent(packet_size*image->columns)),ZipMaxExtent(packet_size* @@ -1243,7 +1245,8 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, if (image->matte != MagickFalse) quantum_type=IndexAlphaQuantum; } - if ((image->type == BilevelType) || (image->type == GrayscaleType)) + if ((image->type == BilevelType) || (image->type == GrayscaleType) || + (image->type == GrayscaleMatteType)) { quantum_type=GrayQuantum; if (image->matte != MagickFalse) -- 2.40.0