plug-ins: Remove metadata on J2K and PSB export

Exiv2 does not yet support metadata export for PSB
and J2K export. For now, we will turn off the metadata
options when exporting in these formats.
This commit is contained in:
Alx Sa 2025-08-31 13:22:28 +00:00
parent d16fe453b6
commit 0faa10ddd6
2 changed files with 17 additions and 9 deletions

View file

@ -471,8 +471,6 @@ jp2_create_procedure (GimpPlugIn *plug_in,
FALSE,
G_PARAM_READWRITE);
#endif
gimp_export_procedure_set_support_comment (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
}
return procedure;
@ -1718,13 +1716,19 @@ export_image (GFile *file,
"quality", &quality,
"ict", &ict,
"resolution", &resolution,
"include-comment", &save_comment,
"gimp-comment", &comment,
#if ((OPJ_VERSION_MAJOR == 2 && OPJ_VERSION_MINOR == 5 && OPJ_VERSION_BUILD >= 3) || \
(OPJ_VERSION_MAJOR == 2 && OPJ_VERSION_MINOR > 5) || OPJ_VERSION_MAJOR > 2)
"cmyk", &cmyk,
#endif
NULL);
if (! strcmp (gimp_procedure_get_name (procedure), EXPORT_JP2_PROC))
g_object_get (config,
"include-comment", &save_comment,
"gimp-comment", &comment,
NULL);
else
save_comment = FALSE;
compliance =
gimp_procedure_config_get_choice_id (GIMP_PROCEDURE_CONFIG (config),
"compliance");

View file

@ -305,11 +305,15 @@ psd_create_procedure (GimpPlugIn *plug_in,
FALSE,
G_PARAM_READWRITE);
gimp_export_procedure_set_support_exif (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
gimp_export_procedure_set_support_iptc (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
gimp_export_procedure_set_support_xmp (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
gimp_export_procedure_set_support_profile (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
gimp_export_procedure_set_support_thumbnail (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
/* TODO: Remove condition when PSB metadata is supported by Exiv2 */
if (! strcmp (name, EXPORT_PROC))
{
gimp_export_procedure_set_support_exif (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
gimp_export_procedure_set_support_iptc (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
gimp_export_procedure_set_support_xmp (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
gimp_export_procedure_set_support_profile (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
gimp_export_procedure_set_support_thumbnail (GIMP_EXPORT_PROCEDURE (procedure), TRUE);
}
}
else if (! strcmp (name, LOAD_METADATA_PROC))
{