GNOME Bugzilla – Bug 757268
Image files with metadata cannot be saved as XCF with maximum compatibility
Last modified: 2016-01-10 19:55:15 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.
The metadata thing is on purpose, the NEW_OVERLAY_MODE thing probably isn't. Please don't file two issues in one bug :)
I Looked again, I don't know what you mean. NEW_OVERLAY_MODE triggers XCF version 9. Does this look somehow broken to you?
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(-)
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.
This problem has been alleviated by the fix in bug 759210 Changed status to RESOLVED FIXED