After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757268 - Image files with metadata cannot be saved as XCF with maximum compatibility
Image files with metadata cannot be saved as XCF with maximum compatibility
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other All
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2015-10-28 20:57 UTC by Jonathan Tait
Modified: 2016-01-10 19:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jonathan Tait 2015-10-28 20:57:26 UTC
Steps:
- open an ordinary PNG, JPG or TIFF
- File > Save as...

Problem:
 the "Save this XCF file with maximum compatibility" checkbox is greyed-out.

Cause:
ref: https://git.gnome.org/browse/gimp/tree/app/widgets/gimpsavedialog.c#n264

gimp_image_get_xcf_version() is called twice to work out which XCF versions are necessary to encode the image with and without zlib compression. If the same versions are required, the image is deemed not-savable with maximum compatibility.

Unfortunately, if the image has metadata, gimp_image_get_xcf_version() returns the SAME version number, viz. version=210 
ref: https://git.gnome.org/browse/gimp/tree/app/core/gimpimage.c#n2322

--------------------------
Also, I notice in gimp_image_get_xcf_version() 
https://git.gnome.org/browse/gimp/tree/app/core/gimpimage.c#n2292

The layer-testing loop will terminate if the required version reaches 3 or more, and so ignore any subsequent layers in GIMP_NEW_OVERLAY_MODE.
Comment 1 Michael Natterer 2015-10-28 21:40:35 UTC
The metadata thing is on purpose, the NEW_OVERLAY_MODE thing probably
isn't. Please don't file two issues in one bug :)
Comment 2 Michael Natterer 2015-10-29 07:07:40 UTC
I Looked again, I don't know what you mean. NEW_OVERLAY_MODE triggers
XCF version 9. Does this look somehow broken to you?
Comment 3 Michael Natterer 2015-10-29 11:03:38 UTC
I must be blind, of course it was broken:

commit 1b99f57e4711dfdd3ac3f9f7422e163283032154
Author: Michael Natterer <mitch@gimp.org>
Date:   Thu Oct 29 08:16:44 2015 +0100

    app: fix GIMP_NEW_OVERLAY_MODE in gimp_image_get_xcf_version()
    
    Don't abort the layer checking loop too early, and make sure to
    iterate all layers, not just the toplevel. Spotted by Jonathan Tait.

 app/core/gimpimage.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Comment 4 Michael Natterer 2015-10-29 11:05:04 UTC
I don't think we should add the option to save the old and truly
broken metadata stuff. Newly saved XCF images with metadata are
simply not readable by GIMP 2.8.
Comment 5 Jonathan Tait 2016-01-08 19:08:58 UTC
This problem has been alleviated by the fix in bug 759210

Changed status to RESOLVED FIXED