libgimp: deactivate metadata flags without appropriate property in…

… gimp_procedure_config_save_metadata().

If you use gimp_procedure_config_save_metadata() or
gimp_procedure_config_end_export(), you don't really control the flags
and let the GimpProcedure API make somes choices for you, based on
various assumptions. One of them is that the procedure has specific
properties (named "save-*", either created manually or with the various
gimp_save_procedure_set_support_*() functions). So if you don't have
them, we should assume this format doesn't handle a given metadata
format and deactivate it.

For plug-ins with a different/specific logic, they are expected not to
use these helper functions. They would likely call lower level functions
such as gimp_image_metadata_save_finish() or the newer
gimp_image_metadata_save_filter(), where you control the metadata flags.
This commit is contained in:
Jehan 2022-09-10 21:35:00 +02:00
parent 646bc3e43b
commit b24d4c93e2
1 changed files with 4 additions and 0 deletions

View File

@ -861,6 +861,10 @@ gimp_procedure_config_save_metadata (GimpProcedureConfig *config,
else
config->priv->metadata_flags &= ~prop_flag;
}
else
{
config->priv->metadata_flags &= ~prop_flag;
}
}
if (! gimp_image_metadata_save_finish (exported_image,