]> granicus.if.org Git - imagemagick/commitdiff
Moved writing the alpha channel.
authordirk <dirk@git.imagemagick.org>
Mon, 26 Sep 2016 18:25:41 +0000 (20:25 +0200)
committerdirk <dirk@git.imagemagick.org>
Mon, 26 Sep 2016 18:25:41 +0000 (20:25 +0200)
coders/psd.c

index 4cf7548a3ebb6d8cb6e65209ea6d23864e5e5cbd..5fba21f3cb01b4c39728f3f9b1d98aae655a16f3 100644 (file)
@@ -2637,16 +2637,16 @@ static MagickBooleanType WriteImageChannels(const PSDInfo *psd_info,
               count+=length;
             }
         }
-    }
-  if (next_image->alpha_trait != UndefinedPixelTrait)
-    {
-      length=WriteOneChannel(psd_info,image_info,image,next_image,AlphaQuantum,
-        compact_pixels,rows_offset,separate,exception);
-      if (separate != MagickFalse)
-        size_offset+=WritePSDSize(psd_info,image,length,size_offset)+2;
-      else
-        rows_offset+=offset_length;
-      count+=length;
+      if (next_image->alpha_trait != UndefinedPixelTrait)
+        {
+          length=WriteOneChannel(psd_info,image_info,image,next_image,
+            AlphaQuantum,compact_pixels,rows_offset,separate,exception);
+          if (separate != MagickFalse)
+            size_offset+=WritePSDSize(psd_info,image,length,size_offset)+2;
+          else
+            rows_offset+=offset_length;
+          count+=length;
+        }
     }
   compact_pixels=(unsigned char *) RelinquishMagickMemory(compact_pixels);
   if (next_image->colorspace == CMYKColorspace)