Commit Graph

6 Commits

Author SHA1 Message Date
Anders Jonsson 7c4ad8aed7 plug-ins: typo and spacing fixes 2023-03-26 19:20:48 +00:00
Jehan 4f1d0fb53b plug-ins: get rid of various gimp_image_set_file() calls.
- This is unneeded in all import procedures. See previous commit. Note though
  that this is not because of a change in previous commit. This was already
  useless previously. The file set with this PDB function was overridden by the
  core anyway (i.e. even before the previous commits).
  In app/file/file-import.c:file_import_image(), the imported file is correctly
  set (so there is no need to set it from plug-in, which anyway libgimp's
  gimp_image_set_file() was not doing) and the XCF file is reset to NULL
  (rendering the call to gimp_image_set_file() in a GimpLoadProcedure useless).
- Similarly, this is a useless call in export procedures because
  app/file/file-save.c:file_save() overrides such call too. I could only see one
  such case for JPEG export, which was quite useless.
- Finally in other types of plug-ins, setting a non-XCF file extension was
  interfering with the save feature (similarly to commit e6e73e14c7). I only
  fixed the screenshot implementations doing such a thing.
- I left a few usages which will have to be looked at more in details later.
2023-02-13 22:54:16 +01:00
Alx Sa 01afc271ce plug-ins: Don't show invalid icons twice on export
This adds a check to make sure icon is valid when displaying
the icons in order, to prevent duplicates showing there and in the
invalid list at the bottom
2022-11-16 14:54:11 -05:00
Jehan 255cab6b43 plug-ins: fix a crash for closing a FILE twice.
Fixes:

> free(): double free detected in tcache 2

The file is closed also after resource_load() runs. Anyway it's better to free
resource on the same level they were created, so I remove the fclose inside the
function.
2022-10-26 00:23:18 +02:00
Alx Sa 08fedaa55a plug-ins: Add initial ICNS export support
This adds the ability to export to the most "compatible" modern ICNS
format for a particular layer.
2022-10-24 23:46:17 +00:00
Alx Sa 00232e1787 plug-ins: Add support for loading .icns files
This ports ICNS loading code from Brion Vibber's 2004 plug-in.
It extends support for ICNS files that contain PNG or JP2 format icons.
2022-10-16 02:20:51 +00:00