gimp r25713 - in branches/gimp-2-4: . plug-ins/common



Author: neo
Date: Mon May 19 14:21:26 2008
New Revision: 25713
URL: http://svn.gnome.org/viewvc/gimp?rev=25713&view=rev

Log:
2008-05-19  Sven Neumann  <sven gimp org>

	Merged from trunk:

	* plug-ins/common/psd-save.c (save_layer_and_mask): corrected
	"layer mask disabled" flag in layer mask data section (bug #526811).


Modified:
   branches/gimp-2-4/ChangeLog
   branches/gimp-2-4/plug-ins/common/psd-save.c

Modified: branches/gimp-2-4/plug-ins/common/psd-save.c
==============================================================================
--- branches/gimp-2-4/plug-ins/common/psd-save.c	(original)
+++ branches/gimp-2-4/plug-ins/common/psd-save.c	Mon May 19 14:21:26 2008
@@ -1129,18 +1129,20 @@
       mask = gimp_layer_get_mask (PSDImageData.lLayers[i]);
       if (mask  >= 0)
         {
+          gboolean apply = gimp_layer_get_apply_mask (PSDImageData.lLayers[i]);
+
           IFDBG printf ("\t\tLayer mask size: %d\n", 20);
-          write_gint32  (fd, 20,                        "Layer mask size");
-          write_gint32  (fd, 0,                         "Layer mask top");
-          write_gint32  (fd, 0,                         "Layer mask left");
-          write_gint32  (fd, gimp_drawable_height(mask),"Layer mask bottom");
-          write_gint32  (fd, gimp_drawable_width(mask), "Layer mask right");
-          write_gchar  (fd, 0,                         "lmask default color");
-          flags = (1                                        | /* relative */
-                   (gimp_layer_get_apply_mask(PSDImageData.lLayers[i]) << 1) | /* disabled?*/
-                   (0 << 2)                                   /* invert   */);
-          write_gchar  (fd, flags,                      "layer mask flags");
-          write_gint16 (fd, 0,                          "Layer mask Padding");
+          write_gint32 (fd, 20,                        "Layer mask size");
+          write_gint32 (fd, 0,                         "Layer mask top");
+          write_gint32 (fd, 0,                         "Layer mask left");
+          write_gint32 (fd, gimp_drawable_height(mask),"Layer mask bottom");
+          write_gint32 (fd, gimp_drawable_width(mask), "Layer mask right");
+          write_gchar  (fd, 0,                         "Layer mask default color");
+          flags = (1                    |  /* position relative to layer */
+                   (apply ? 0 : 1) << 1 |  /* layer mask disabled        */
+                   0 << 2);                /* invert layer mask          */
+          write_gchar  (fd, flags,                     "Layer mask flags");
+          write_gint16 (fd, 0,                         "Layer mask Padding");
         }
       else
         {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]