[gimp] app: add XCF version 13 for images with group-layer masks
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add XCF version 13 for images with group-layer masks
- Date: Mon, 5 Feb 2018 20:16:34 +0000 (UTC)
commit 17fb6447872be8feb020858c6cb565b5634f0a0b
Author: Ell <ell_se yahoo com>
Date: Mon Feb 5 13:54:21 2018 -0500
app: add XCF version 13 for images with group-layer masks
app/core/gimpimage.c | 9 ++++++++-
app/xcf/xcf.c | 3 ++-
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index d8457c7..c0e413c 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -2445,7 +2445,13 @@ gimp_image_get_xcf_version (GimpImage *image,
/* need version 3 for layer trees */
if (gimp_viewable_get_children (GIMP_VIEWABLE (layer)))
- version = MAX (3, version);
+ {
+ version = MAX (3, version);
+
+ /* need version 13 for group layers with masks */
+ if (gimp_layer_get_mask (layer))
+ version = MAX (13, version);
+ }
}
g_list_free (layers);
@@ -2502,6 +2508,7 @@ gimp_image_get_xcf_version (GimpImage *image,
case 10:
case 11:
case 12:
+ case 13:
if (gimp_version) *gimp_version = 210;
if (version_string) *version_string = "GIMP 2.10";
break;
diff --git a/app/xcf/xcf.c b/app/xcf/xcf.c
index 7cc6944..16cee0b 100644
--- a/app/xcf/xcf.c
+++ b/app/xcf/xcf.c
@@ -79,7 +79,8 @@ static GimpXcfLoaderFunc * const xcf_loaders[] =
xcf_load_image, /* version 9 */
xcf_load_image, /* version 10 */
xcf_load_image, /* version 11 */
- xcf_load_image /* version 12 */
+ xcf_load_image, /* version 12 */
+ xcf_load_image /* version 13 */
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]