Commit dcf21efc authored by Michael Natterer's avatar Michael Natterer 😴

libgimpcolor: add gimp_lcms_profile_close()

So code that only needs a profile's metadata doesn't need to depend on
lcms2 any longer.
parent 4d99321f
......@@ -38,6 +38,7 @@ EXPORTS
gimp_hsva_set
gimp_hwb_to_rgb
gimp_lcms_create_srgb_profile
gimp_lcms_profile_close
gimp_lcms_profile_get_copyright
gimp_lcms_profile_get_description
gimp_lcms_profile_get_label
......
......@@ -186,6 +186,14 @@ gimp_lcms_profile_save_to_data (GimpColorProfile profile,
return NULL;
}
void
gimp_lcms_profile_close (GimpColorProfile profile)
{
g_return_if_fail (profile != NULL);
cmsCloseProfile (profile);
}
static gchar *
gimp_lcms_profile_get_info (GimpColorProfile profile,
cmsInfoType info)
......@@ -462,7 +470,7 @@ gimp_lcms_create_srgb_profile (void)
profile_data = gimp_lcms_profile_save_to_data (profile, &profile_length,
NULL);
cmsCloseProfile (profile);
gimp_lcms_profile_close (profile);
}
return gimp_lcms_profile_open_from_data (profile_data, profile_length, NULL);
......
......@@ -40,6 +40,7 @@ GimpColorProfile gimp_lcms_profile_open_from_data (const guint8 *data,
guint8 * gimp_lcms_profile_save_to_data (GimpColorProfile profile,
gsize *length,
GError **error);
void gimp_lcms_profile_close (GimpColorProfile profile);
gchar * gimp_lcms_profile_get_description (GimpColorProfile profile);
gchar * gimp_lcms_profile_get_manufacturer (GimpColorProfile profile);
......
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