From: cristy Date: Sun, 13 May 2012 18:05:12 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5601 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2c3f40ce0ea68322a5162946f891a5b646da3e7;p=imagemagick --- diff --git a/coders/art.c b/coders/art.c index c6f037ddc..aaa76b755 100644 --- a/coders/art.c +++ b/coders/art.c @@ -132,7 +132,6 @@ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception) image=DestroyImageList(image); return((Image *) NULL); } - SetImageColorspace(image,GRAYColorspace,exception); image->depth=1; image->endian=MSBEndian; (void) ReadBlobLSBShort(image); @@ -147,6 +146,7 @@ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Convert bi-level image to pixel packets. */ + SetImageColorspace(image,GRAYColorspace,exception); quantum_info=AcquireQuantumInfo(image_info,image); if (quantum_info == (QuantumInfo *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); diff --git a/coders/dpx.c b/coders/dpx.c index 8190e048a..3b3b2ef2a 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -598,7 +598,6 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Read DPX file header. */ - SetImageColorspace(image,RGBColorspace,exception); offset=0; count=ReadBlob(image,4,(unsigned char *) magick); offset+=count; @@ -730,6 +729,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) offset+=ReadBlob(image,sizeof(dpx.image.image_element[i].description), (unsigned char *) dpx.image.image_element[i].description); } + SetImageColorspace(image,RGBColorspace,exception); SetPrimaryChromaticity((DPXColorimetric) dpx.image.image_element[0].colorimetric,&image->chromaticity); offset+=ReadBlob(image,sizeof(dpx.image.reserve),(unsigned char *) diff --git a/coders/fits.c b/coders/fits.c index 6aa2f15c6..84454f841 100644 --- a/coders/fits.c +++ b/coders/fits.c @@ -416,13 +416,13 @@ static Image *ReadFITSImage(const ImageInfo *image_info, fits_info.bits_per_pixel; image->endian=fits_info.endian; image->scene=(size_t) scene; - SetImageColorspace(image,GRAYColorspace,exception); if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0)) if (image->scene >= (image_info->scene+image_info->number_scenes-1)) break; /* Initialize image structure. */ + SetImageColorspace(image,GRAYColorspace,exception); if ((fits_info.min_data != 0.0) || (fits_info.max_data != 0.0)) { if ((fits_info.bits_per_pixel != 0) && (fits_info.max_data == 0.0))