Skip to content

Issue: #8581 Fix file extension issue when "Saving As..." for guillotine

This is possible solution for the issue #8581 (closed). It is present on 2.10 as well as master.

The root as I was able to determine is the following:

  1. When an image with a non-xcf format is loaded, within GIMP core it qualifies as an imported file. It is set as GimpImage.imported_file.

  2. But the guillotine plugin cannot read nor propagate this information. It can only read through the "gimp_image_get_filename" function where the imported information is lost. Then it will set the filename with "gimp_image_set_filename" function which stores it in GimpImage.file.

  3. This leads to the gimpsavedialog.c module cannot differentiate the generated files as something that was imported. This results in the incorrect file extension being set in the "gimp_save_dialog_set_image" function.

Implications This issue can actually be present in other plugins as well that generate new images. This might need to be checked. Not sure if I should create another issue for this.

Proposed solution in this PR This simple solution fixes this by replacing the file extension with "xcf" in the guillotine plugin.

Alternative solution Though this might not be the best solution. Maybe an additional interface to access the imported image state from core GIMP would be a better option.

Edited by Dávid Tamás Nyári-Kovács

Merge request reports