]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 13 May 2012 18:05:12 +0000 (18:05 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 13 May 2012 18:05:12 +0000 (18:05 +0000)
coders/art.c
coders/dpx.c
coders/fits.c

index c6f037ddcd0063fa6e61699b7f8e98996ded8f78..aaa76b7559fce62bc4857a02d8d6a9d616d47110 100644 (file)
@@ -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");
index 8190e048a4aafeff0748d7c175d46deeb7a6f790..3b3b2ef2a3bc2e2047cfea2f17cab9be5d975bd5 100644 (file)
@@ -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 *)
index 6aa2f15c68c0bcc3d28ee795e3e270227fd0baaf..84454f8410c09818cd5a9cd45b9beac9f6091197 100644 (file)
@@ -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))