[gimp] Bug 795693 - GIMP doesn't enable visibility of vector layers in PSD



commit 474e27b27a4a74e94d996f8c8b0176dcfc42f0ca
Author: Ell <ell_se yahoo com>
Date:   Tue May 1 02:44:01 2018 -0400

    Bug 795693 - GIMP doesn't enable visibility of vector layers in PSD
    
    In the file-psd plug-in, ignore the 'irrelevant' flag of layers
    when loading PSD files; in particular, don't hide such layers
    unconditionally.  The 'irrelevant' flag seems to indicate that the
    layer's content can be entirely derived without using the layer's
    pixel data, and not that the layer itself it irrelevant.

 plug-ins/file-psd/psd-load.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c
index 2533172..87b94a1 100644
--- a/plug-ins/file-psd/psd-load.c
+++ b/plug-ins/file-psd/psd-load.c
@@ -1464,11 +1464,23 @@ add_layers (gint32     image_id,
                   /* Flags */
                   gimp_layer_set_lock_alpha  (layer_id, lyr_a[lidx]->layer_flags.trans_prot);
                   gimp_item_set_visible (layer_id, lyr_a[lidx]->layer_flags.visible);
+#if 0
+                  /* according to the spec, the 'irrelevant' flag indicates
+                   * that the layer's "pixel data is irrelevant to the
+                   * appearance of the document".  what this seems to mean is
+                   * not that the layer doesn't contribute to the image, but
+                   * rather that its appearance can be entirely derived from
+                   * sources other than the pixel data, such as vector data.
+                   * in particular, this doesn't mean that the layer is
+                   * invisible. since we only support raster layers atm, we can
+                   * just ignore this flag.
+                   */
                   if (lyr_a[lidx]->layer_flags.irrelevant &&
                       lyr_a[lidx]->group_type == 0)
                     {
                       gimp_item_set_visible (layer_id, FALSE);
                     }
+#endif
 
                   /* Position */
                   if (l_x != 0 || l_y != 0)


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