Commit aa02d619 authored by Michael Natterer's avatar Michael Natterer

plug-ins: in file-png, pass a more correct SAVE_COLOR_PROFILE flag...

...to gimp_image_metadata_save_finish(). Set it based on whether the
profile was actually saved, not if we only intended to save it.
parent abd7cbfc
......@@ -163,6 +163,7 @@ static gboolean save_image (const gchar *filename,
gint32 image_ID,
gint32 drawable_ID,
gint32 orig_image_ID,
gboolean *profile_saved,
GError **error);
static int respin_cmap (png_structp pp,
......@@ -630,8 +631,11 @@ run (const gchar *name,
if (status == GIMP_PDB_SUCCESS)
{
gboolean profile_saved = FALSE;
if (save_image (param[3].data.d_string,
image_ID, drawable_ID, orig_image_ID, &error))
image_ID, drawable_ID, orig_image_ID,
&profile_saved, &error))
{
if (metadata)
{
......@@ -659,7 +663,10 @@ run (const gchar *name,
else
metadata_flags &= ~GIMP_METADATA_SAVE_THUMBNAIL;
if (pngvals.save_profile)
/* check if the profile was actually saved, not only
* if we wanted to save it
*/
if (profile_saved)
metadata_flags |= GIMP_METADATA_SAVE_COLOR_PROFILE;
else
metadata_flags &= ~GIMP_METADATA_SAVE_COLOR_PROFILE;
......@@ -1466,6 +1473,7 @@ save_image (const gchar *filename,
gint32 image_ID,
gint32 drawable_ID,
gint32 orig_image_ID,
gboolean *profile_saved,
GError **error)
{
gint i, k; /* Looping vars */
......@@ -1864,6 +1872,8 @@ save_image (const gchar *filename,
g_free (profile_name);
g_object_unref (profile);
*profile_saved = TRUE;
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment