]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 16 Oct 2009 16:49:56 +0000 (16:49 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 16 Oct 2009 16:49:56 +0000 (16:49 +0000)
coders/psd.c

index e05d72a34b8dc3124200d4c33ac06426a8b916b2..9e0ac7422ca19c5be74c5c09de7f410d3fe9d9c7 100644 (file)
@@ -691,8 +691,6 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception)
   if ((psd_info.mode == BitmapMode) || (psd_info.mode == GrayscaleMode) ||
       (psd_info.mode == DuotoneMode))
     {
-      if (AcquireImageColormap(image,256) == MagickFalse)
-        ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
       image->matte=psd_info.channels >= 2 ? MagickTrue : MagickFalse;
       if (image->debug != MagickFalse)
         (void) LogMagickEvent(CoderEvent,GetMagickModule(),
@@ -1338,6 +1336,11 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception)
               case 0:
               {
                 q->red=(Quantum) pixel;
+                if (psd_info.channels == 1)
+                  {
+                    q->green=q->red;
+                    q->blue=q->red;
+                  }
                 if (image->storage_class == PseudoClass)
                   {
                     if (packet_size == 1)