mirror of https://github.com/GNOME/gimp.git
libgimpcolor: add gimp_color_profile_save_to_file()
This commit is contained in:
parent
086dc60505
commit
46096a17e3
|
@ -51,6 +51,7 @@ EXPORTS
|
|||
gimp_color_profile_new_rgb_srgb
|
||||
gimp_color_profile_new_rgb_srgb_linear
|
||||
gimp_color_profile_new_srgb_trc_from_color_profile
|
||||
gimp_color_profile_save_to_file
|
||||
gimp_hsl_get_type
|
||||
gimp_hsl_set
|
||||
gimp_hsl_set_alpha
|
||||
|
|
|
@ -358,6 +358,37 @@ gimp_color_profile_new_from_lcms_profile (gpointer lcms_profile,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_color_profile_save_to_file:
|
||||
* profile: a #GimpColorProfile
|
||||
* @file: a #GFile
|
||||
* @error: return location for #GError
|
||||
*
|
||||
* This function saves @profile to @file as ICC profile.
|
||||
*
|
||||
* Return value: %TRUE on success, %FALSE if an error occured.
|
||||
*
|
||||
* Since: 2.10
|
||||
**/
|
||||
gboolean
|
||||
gimp_color_profile_save_to_file (GimpColorProfile *profile,
|
||||
GFile *file,
|
||||
GError **error)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_COLOR_PROFILE (profile), FALSE);
|
||||
g_return_val_if_fail (G_IS_FILE (file), FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
return g_file_replace_contents (file,
|
||||
(const gchar *) profile->priv->data,
|
||||
profile->priv->length,
|
||||
NULL, FALSE,
|
||||
G_FILE_CREATE_NONE,
|
||||
NULL,
|
||||
NULL,
|
||||
error);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_color_profile_get_icc_profile:
|
||||
* @profile: a #GimpColorProfile
|
||||
|
|
|
@ -86,6 +86,10 @@ GimpColorProfile * gimp_color_profile_new_from_icc_profile (const guint8 *
|
|||
GimpColorProfile * gimp_color_profile_new_from_lcms_profile (gpointer lcms_profile,
|
||||
GError **error);
|
||||
|
||||
gboolean gimp_color_profile_save_to_file (GimpColorProfile *profile,
|
||||
GFile *file,
|
||||
GError **error);
|
||||
|
||||
const guint8 * gimp_color_profile_get_icc_profile (GimpColorProfile *profile,
|
||||
gsize *length);
|
||||
gpointer gimp_color_profile_get_lcms_profile (GimpColorProfile *profile);
|
||||
|
|
Loading…
Reference in New Issue