[gimp] plug-ins: in file-psd, fix missing some attributes loading empty layers
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: in file-psd, fix missing some attributes loading empty layers
- Date: Sun, 27 Aug 2017 19:17:56 +0000 (UTC)
commit f3d684b0fc11b2d6c7bd319f91044681bf97fcba
Author: Juan Palacios <jpalaciosdev gmail com>
Date: Sun Aug 27 18:26:50 2017 +0200
plug-ins: in file-psd, fix missing some attributes loading empty layers
plug-ins/file-psd/psd-load.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c
index 9cb8eea..5c5ee1d 100644
--- a/plug-ins/file-psd/psd-load.c
+++ b/plug-ins/file-psd/psd-load.c
@@ -1428,12 +1428,17 @@ add_layers (gint32 image_id,
{
IFDBG(2) g_debug ("Create blank layer");
image_type = get_gimp_image_type (img_a->base_type, TRUE);
+ psd_to_gimp_blend_mode (lyr_a[lidx]->blend_mode, &mode_info);
layer_id = gimp_layer_new (image_id, lyr_a[lidx]->name,
img_a->columns, img_a->rows,
image_type,
- 0,
- gimp_image_get_default_new_layer_mode (image_id));
+ lyr_a[lidx]->opacity * 100 / 255,
+ mode_info.mode);
g_free (lyr_a[lidx]->name);
+ gimp_layer_set_blend_space (layer_id, mode_info.blend_space);
+ gimp_layer_set_composite_space (layer_id, mode_info.composite_space);
+ gimp_layer_set_composite_mode (layer_id, mode_info.composite_mode);
+ gimp_layer_set_lock_alpha (layer_id, lyr_a[lidx]->layer_flags.trans_prot);
gimp_image_insert_layer (image_id, layer_id, parent_group_id, 0);
gimp_drawable_fill (layer_id, GIMP_FILL_TRANSPARENT);
gimp_item_set_visible (layer_id, lyr_a[lidx]->layer_flags.visible);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]