[gimp] libgimpcolor: add gimp_lcms_profile_close()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpcolor: add gimp_lcms_profile_close()
- Date: Wed, 6 May 2015 14:40:39 +0000 (UTC)
commit dcf21efcc2b46758b8e9426ee52d544fea987040
Author: Michael Natterer <mitch gimp org>
Date: Wed May 6 16:28:45 2015 +0200
libgimpcolor: add gimp_lcms_profile_close()
So code that only needs a profile's metadata doesn't need to depend on
lcms2 any longer.
libgimpcolor/gimpcolor.def | 1 +
libgimpcolor/gimplcms.c | 10 +++++++++-
libgimpcolor/gimplcms.h | 1 +
3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/libgimpcolor/gimpcolor.def b/libgimpcolor/gimpcolor.def
index 92d9c0c..a23e773 100644
--- a/libgimpcolor/gimpcolor.def
+++ b/libgimpcolor/gimpcolor.def
@@ -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
diff --git a/libgimpcolor/gimplcms.c b/libgimpcolor/gimplcms.c
index dff0efa..3720982 100644
--- a/libgimpcolor/gimplcms.c
+++ b/libgimpcolor/gimplcms.c
@@ -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);
diff --git a/libgimpcolor/gimplcms.h b/libgimpcolor/gimplcms.h
index e667020..02bd646 100644
--- a/libgimpcolor/gimplcms.h
+++ b/libgimpcolor/gimplcms.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]