Commit 4910c289 authored by Michael Natterer's avatar Michael Natterer 😴

libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()

because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
parent b8eeb9ed
......@@ -78,9 +78,9 @@ gimp_image_validate_icc_profile (GimpImage *image,
return FALSE;
}
profile = gimp_lcms_profile_open_from_data (gimp_parasite_data (icc_profile),
gimp_parasite_data_size (icc_profile),
error);
profile = gimp_color_profile_open_from_data (gimp_parasite_data (icc_profile),
gimp_parasite_data_size (icc_profile),
error);
if (! profile)
{
......@@ -88,16 +88,16 @@ gimp_image_validate_icc_profile (GimpImage *image,
return FALSE;
}
if (! gimp_lcms_profile_is_rgb (profile))
if (! gimp_color_profile_is_rgb (profile))
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("ICC profile validation failed: "
"Color profile is not for RGB color space"));
gimp_lcms_profile_close (profile);
gimp_color_profile_close (profile);
return FALSE;
}
gimp_lcms_profile_close (profile);
gimp_color_profile_close (profile);
return TRUE;
}
......@@ -141,9 +141,9 @@ gimp_image_get_color_profile (GimpImage *image,
parasite = gimp_image_get_icc_profile (image);
if (parasite)
return gimp_lcms_profile_open_from_data (gimp_parasite_data (parasite),
gimp_parasite_data_size (parasite),
error);
return gimp_color_profile_open_from_data (gimp_parasite_data (parasite),
gimp_parasite_data_size (parasite),
error);
return NULL;
}
......@@ -163,7 +163,7 @@ gimp_image_set_color_profile (GimpImage *image,
guint8 *data;
gsize length;
data = gimp_lcms_profile_save_to_data (profile, &length, error);
data = gimp_color_profile_save_to_data (profile, &length, error);
if (! data)
return FALSE;
......
......@@ -1405,9 +1405,9 @@ gimp_image_color_managed_get_color_profile (GimpColorManaged *managed)
const Babl *format = gimp_image_get_layer_format (image, FALSE);
if (gimp_babl_format_get_linear (format))
profile = gimp_lcms_create_linear_rgb_profile ();
profile = gimp_color_profile_new_linear_rgb ();
else
profile = gimp_lcms_create_srgb_profile ();
profile = gimp_color_profile_new_srgb ();
}
return profile;
......
......@@ -459,9 +459,9 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
profile = gimp_color_managed_get_color_profile (managed);
i += print (title, title_len, i, "%s",
gimp_lcms_profile_get_label (profile));
gimp_color_profile_get_label (profile));
gimp_lcms_profile_close (profile);
gimp_color_profile_close (profile);
}
break;
......
......@@ -1148,7 +1148,7 @@ gimp_display_shell_get_color_profile (GimpColorManaged *managed)
return gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (image));
/* never return a NULL profile */
return gimp_lcms_create_srgb_profile ();;
return gimp_color_profile_new_srgb ();;
}
static void
......
......@@ -112,5 +112,5 @@ gimp_image_profile_view_update (GimpImageParasiteView *view)
gimp_color_profile_view_set_profile (profile_view->profile_view, profile);
gimp_lcms_profile_close (profile);
gimp_color_profile_close (profile);
}
......@@ -18,11 +18,11 @@
<xi:include href="xml/gimpcmyk.xml" />
<xi:include href="xml/gimpcolorspace.xml" />
<xi:include href="xml/gimpcolormanaged.xml" />
<xi:include href="xml/gimpcolorprofile.xml" />
<xi:include href="xml/gimpadaptivesupersample.xml" />
<xi:include href="xml/gimpbilinear.xml" />
<xi:include href="xml/gimpcairo.xml" />
<xi:include href="xml/gimppixbuf.xml" />
<xi:include href="xml/gimplcms.xml" />
</part>
<index id="api-index-full">
......
......@@ -30,28 +30,6 @@ gimp_hsv_get_type
gimp_hsl_get_type
</SECTION>
<SECTION>
<FILE>gimplcms</FILE>
GimpColorProfile
GimpColorTransform
gimp_lcms_profile_open_from_file
gimp_lcms_profile_open_from_data
gimp_lcms_profile_close
gimp_lcms_profile_save_to_data
gimp_lcms_profile_get_description
gimp_lcms_profile_get_manufacturer
gimp_lcms_profile_get_model
gimp_lcms_profile_get_copyright
gimp_lcms_profile_get_label
gimp_lcms_profile_get_summary
gimp_lcms_profile_is_equal
gimp_lcms_profile_is_rgb
gimp_lcms_profile_is_cmyk
gimp_lcms_create_srgb_profile
gimp_lcms_create_linear_rgb_profile
gimp_lcms_get_format
</SECTION>
<SECTION>
<FILE>gimppixbuf</FILE>
gimp_pixbuf_get_format
......@@ -155,6 +133,29 @@ GIMP_COLOR_MANAGED_GET_INTERFACE
gimp_color_managed_interface_get_type
</SECTION>
<SECTION>
<FILE>gimpcolorprofile</FILE>
<TITLE>GimpColorProfile</TITLE>
GimpColorProfile
GimpColorTransform
gimp_color_profile_open_from_file
gimp_color_profile_open_from_data
gimp_color_profile_save_to_data
gimp_color_profile_close
gimp_color_profile_get_description
gimp_color_profile_get_manufacturer
gimp_color_profile_get_model
gimp_color_profile_get_copyright
gimp_color_profile_get_label
gimp_color_profile_get_summary
gimp_color_profile_is_equal
gimp_color_profile_is_rgb
gimp_color_profile_is_cmyk
gimp_color_profile_new_srgb
gimp_color_profile_new_linear_rgb
gimp_color_profile_get_format
</SECTION>
<SECTION>
<FILE>gimpadaptivesupersample</FILE>
<TITLE>GimpAdaptiveSupersample</TITLE>
......
......@@ -74,14 +74,14 @@ libgimpcolor_@GIMP_API_VERSION@_la_SOURCES = \
gimpcmyk.h \
gimpcolormanaged.c \
gimpcolormanaged.h \
gimpcolorprofile.c \
gimpcolorprofile.h \
gimpcolorspace.c \
gimpcolorspace.h \
gimphsl.c \
gimphsl.h \
gimphsv.c \
gimphsv.h \
gimplcms.c \
gimplcms.h \
gimppixbuf.c \
gimppixbuf.h \
gimprgb.c \
......@@ -96,10 +96,10 @@ libgimpcolorinclude_HEADERS = \
gimpcairo.h \
gimpcmyk.h \
gimpcolormanaged.h \
gimpcolorprofile.h \
gimpcolorspace.h \
gimphsl.h \
gimphsv.h \
gimplcms.h \
gimppixbuf.h \
gimprgb.h
......
......@@ -25,6 +25,22 @@ EXPORTS
gimp_color_managed_get_icc_profile
gimp_color_managed_interface_get_type
gimp_color_managed_profile_changed
gimp_color_profile_close
gimp_color_profile_get_copyright
gimp_color_profile_get_description
gimp_color_profile_get_format
gimp_color_profile_get_label
gimp_color_profile_get_manufacturer
gimp_color_profile_get_model
gimp_color_profile_get_summary
gimp_color_profile_is_cmyk
gimp_color_profile_is_equal
gimp_color_profile_is_rgb
gimp_color_profile_new_linear_rgb
gimp_color_profile_new_srgb
gimp_color_profile_open_from_data
gimp_color_profile_open_from_file
gimp_color_profile_save_to_data
gimp_hsl_get_type
gimp_hsl_set
gimp_hsl_set_alpha
......@@ -38,22 +54,6 @@ EXPORTS
gimp_hsv_to_rgb_int
gimp_hsva_set
gimp_hwb_to_rgb
gimp_lcms_create_linear_rgb_profile
gimp_lcms_create_srgb_profile
gimp_lcms_get_format
gimp_lcms_profile_close
gimp_lcms_profile_get_copyright
gimp_lcms_profile_get_description
gimp_lcms_profile_get_label
gimp_lcms_profile_get_manufacturer
gimp_lcms_profile_get_model
gimp_lcms_profile_get_summary
gimp_lcms_profile_is_cmyk
gimp_lcms_profile_is_equal
gimp_lcms_profile_is_rgb
gimp_lcms_profile_open_from_data
gimp_lcms_profile_open_from_file
gimp_lcms_profile_save_to_data
gimp_param_rgb_get_type
gimp_param_spec_rgb
gimp_param_spec_rgb_has_alpha
......
......@@ -27,11 +27,11 @@
#include <libgimpcolor/gimpbilinear.h>
#include <libgimpcolor/gimpcairo.h>
#include <libgimpcolor/gimpcolormanaged.h>
#include <libgimpcolor/gimpcolorprofile.h>
#include <libgimpcolor/gimpcolorspace.h>
#include <libgimpcolor/gimpcmyk.h>
#include <libgimpcolor/gimphsl.h>
#include <libgimpcolor/gimphsv.h>
#include <libgimpcolor/gimplcms.h>
#include <libgimpcolor/gimppixbuf.h>
#include <libgimpcolor/gimprgb.h>
......
......@@ -27,7 +27,7 @@
#include "gimpcolortypes.h"
#include "gimpcolormanaged.h"
#include "gimplcms.h"
#include "gimpcolorprofile.h"
/**
......@@ -135,7 +135,7 @@ gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
* @managed: an object the implements the #GimpColorManaged interface
*
* This function always returns a #GimpColorProfile and falls back to
* gimp_lcms_create_srgb_profile() if the method is not implemented.
* gimp_color_profile_new_srgb() if the method is not implemented.
*
* Return value: The @managed's #GimpColorProfile.
*
......@@ -154,7 +154,7 @@ gimp_color_managed_get_color_profile (GimpColorManaged *managed)
return iface->get_color_profile (managed);
/* never return a NULL profile */
return gimp_lcms_create_srgb_profile ();
return gimp_color_profile_new_srgb ();
}
/**
......
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
*
* gimplcms.c
* gimpcolorprofile.c
* Copyright (C) 2014 Michael Natterer <mitch@gimp.org>
* Elle Stone <ellestone@ninedegreesbelow.com>
*
......@@ -33,14 +33,14 @@
#include "gimpcolortypes.h"
#include "gimplcms.h"
#include "gimpcolorprofile.h"
#include "libgimp/libgimp-intl.h"
/**
* SECTION: gimplcms
* @title: GimpLcms
* SECTION: gimpcolorprofile
* @title: GimpColorProfile
* @short_description: Definitions and Functions relating to LCMS.
*
* Definitions and Functions relating to LCMS.
......@@ -59,18 +59,18 @@
static GQuark
gimp_lcms_error_quark (void)
gimp_color_profile_error_quark (void)
{
static GQuark quark = 0;
if (G_UNLIKELY (quark == 0))
quark = g_quark_from_static_string ("gimp-lcms-error-quark");
quark = g_quark_from_static_string ("gimp-color-profile-error-quark");
return quark;
}
/**
* gimp_lcms_profile_open_from_file:
* gimp_color_profile_open_from_file:
* @file: a #GFile
* @error: return location for #GError
*
......@@ -82,8 +82,8 @@ gimp_lcms_error_quark (void)
* Since: 2.10
**/
GimpColorProfile
gimp_lcms_profile_open_from_file (GFile *file,
GError **error)
gimp_color_profile_open_from_file (GFile *file,
GError **error)
{
GimpColorProfile profile = NULL;
gchar *path;
......@@ -148,7 +148,7 @@ gimp_lcms_profile_open_from_file (GFile *file,
}
if (! profile && error && *error == NULL)
g_set_error (error, gimp_lcms_error_quark (), 0,
g_set_error (error, gimp_color_profile_error_quark (), 0,
_("'%s' does not appear to be an ICC color profile"),
gimp_file_get_utf8_name (file));
......@@ -156,7 +156,7 @@ gimp_lcms_profile_open_from_file (GFile *file,
}
/**
* gimp_lcms_profile_open_from_data:
* gimp_color_profile_open_from_data:
* @data: pointer to memory containing an ICC profile
* @length: lenght of the profile in memory, in bytes
* @error: return location for #GError
......@@ -169,9 +169,9 @@ gimp_lcms_profile_open_from_file (GFile *file,
* Since: 2.10
**/
GimpColorProfile
gimp_lcms_profile_open_from_data (const guint8 *data,
gsize length,
GError **error)
gimp_color_profile_open_from_data (const guint8 *data,
gsize length,
GError **error)
{
GimpColorProfile profile;
......@@ -182,14 +182,14 @@ gimp_lcms_profile_open_from_data (const guint8 *data,
profile = cmsOpenProfileFromMem (data, length);
if (! profile)
g_set_error_literal (error, gimp_lcms_error_quark (), 0,
g_set_error_literal (error, gimp_color_profile_error_quark (), 0,
_("Data does not appear to be an ICC color profile"));
return profile;
}
/**
* gimp_lcms_profile_dave_to_data:
* gimp_color_profile_dave_to_data:
* @profile: a #GimpColorProfile
* @length: return location for the number of bytes written
* @error: return location for #GError
......@@ -203,9 +203,9 @@ gimp_lcms_profile_open_from_data (const guint8 *data,
* Since: 2.10
**/
guint8 *
gimp_lcms_profile_save_to_data (GimpColorProfile profile,
gsize *length,
GError **error)
gimp_color_profile_save_to_data (GimpColorProfile profile,
gsize *length,
GError **error)
{
cmsUInt32Number size;
......@@ -227,14 +227,14 @@ gimp_lcms_profile_save_to_data (GimpColorProfile profile,
g_free (data);
}
g_set_error_literal (error, gimp_lcms_error_quark (), 0,
g_set_error_literal (error, gimp_color_profile_error_quark (), 0,
_("Could not save color profile to memory"));
return NULL;
}
/**
* gimp_lcms_profile_close:
* gimp_color_profile_close:
* @profile: a #GimpColorProfile
*
* This function closes a #GimpColorProfile and frees its memory.
......@@ -242,7 +242,7 @@ gimp_lcms_profile_save_to_data (GimpColorProfile profile,
* Since: 2.10
**/
void
gimp_lcms_profile_close (GimpColorProfile profile)
gimp_color_profile_close (GimpColorProfile profile)
{
g_return_if_fail (profile != NULL);
......@@ -250,8 +250,8 @@ gimp_lcms_profile_close (GimpColorProfile profile)
}
static gchar *
gimp_lcms_profile_get_info (GimpColorProfile profile,
cmsInfoType info)
gimp_color_profile_get_info (GimpColorProfile profile,
cmsInfoType info)
{
cmsUInt32Number size;
gchar *text = NULL;
......@@ -276,7 +276,7 @@ gimp_lcms_profile_get_info (GimpColorProfile profile,
}
/**
* gimp_lcms_profile_get_description:
* gimp_color_profile_get_description:
* @profile: a #GimpColorProfile
*
* Return value: a newly allocated string containing @profile's
......@@ -285,13 +285,13 @@ gimp_lcms_profile_get_info (GimpColorProfile profile,
* Since: 2.10
**/
gchar *
gimp_lcms_profile_get_description (GimpColorProfile profile)
gimp_color_profile_get_description (GimpColorProfile profile)
{
return gimp_lcms_profile_get_info (profile, cmsInfoDescription);
return gimp_color_profile_get_info (profile, cmsInfoDescription);
}
/**
* gimp_lcms_profile_get_manufacturer:
* gimp_color_profile_get_manufacturer:
* @profile: a #GimpColorProfile
*
* Return value: a newly allocated string containing @profile's
......@@ -300,13 +300,13 @@ gimp_lcms_profile_get_description (GimpColorProfile profile)
* Since: 2.10
**/
gchar *
gimp_lcms_profile_get_manufacturer (GimpColorProfile profile)
gimp_color_profile_get_manufacturer (GimpColorProfile profile)
{
return gimp_lcms_profile_get_info (profile, cmsInfoManufacturer);
return gimp_color_profile_get_info (profile, cmsInfoManufacturer);
}
/**
* gimp_lcms_profile_get_model:
* gimp_color_profile_get_model:
* @profile: a #GimpColorProfile
*
* Return value: a newly allocated string containing @profile's
......@@ -315,13 +315,13 @@ gimp_lcms_profile_get_manufacturer (GimpColorProfile profile)
* Since: 2.10
**/
gchar *
gimp_lcms_profile_get_model (GimpColorProfile profile)
gimp_color_profile_get_model (GimpColorProfile profile)
{
return gimp_lcms_profile_get_info (profile, cmsInfoModel);
return gimp_color_profile_get_info (profile, cmsInfoModel);
}
/**
* gimp_lcms_profile_get_copyright:
* gimp_color_profile_get_copyright:
* @profile: a #GimpColorProfile
*
* Return value: a newly allocated string containing @profile's
......@@ -330,13 +330,13 @@ gimp_lcms_profile_get_model (GimpColorProfile profile)
* Since: 2.10
**/
gchar *
gimp_lcms_profile_get_copyright (GimpColorProfile profile)
gimp_color_profile_get_copyright (GimpColorProfile profile)
{
return gimp_lcms_profile_get_info (profile, cmsInfoCopyright);
return gimp_color_profile_get_info (profile, cmsInfoCopyright);
}
/**
* gimp_lcms_profile_get_label:
* gimp_color_profile_get_label:
* @profile: a #GimpColorProfile
*
* This function returns a newly allocated string containing
......@@ -348,13 +348,13 @@ gimp_lcms_profile_get_copyright (GimpColorProfile profile)
* Since: 2.10
**/
gchar *
gimp_lcms_profile_get_label (GimpColorProfile profile)
gimp_color_profile_get_label (GimpColorProfile profile)
{
gchar *label;
g_return_val_if_fail (profile != NULL, NULL);
label = gimp_lcms_profile_get_description (profile);
label = gimp_color_profile_get_description (profile);
if (label && ! strlen (label))
{
......@@ -363,7 +363,7 @@ gimp_lcms_profile_get_label (GimpColorProfile profile)
}
if (! label)
label = gimp_lcms_profile_get_model (profile);
label = gimp_color_profile_get_model (profile);
if (label && ! strlen (label))
{
......@@ -378,7 +378,7 @@ gimp_lcms_profile_get_label (GimpColorProfile profile)
}
/**
* gimp_lcms_profile_get_summary:
* gimp_color_profile_get_summary:
* @profile: a #GimpColorProfile
*
* This function return a newly allocated string containing a
......@@ -391,7 +391,7 @@ gimp_lcms_profile_get_label (GimpColorProfile profile)
* Since: 2.10
**/
gchar *
gimp_lcms_profile_get_summary (GimpColorProfile profile)
gimp_color_profile_get_summary (GimpColorProfile profile)
{
GString *string;
gchar *text;
......@@ -400,14 +400,14 @@ gimp_lcms_profile_get_summary (GimpColorProfile profile)
string = g_string_new (NULL);
text = gimp_lcms_profile_get_description (profile);
text = gimp_color_profile_get_description (profile);
if (text)
{
g_string_append (string, text);
g_free (text);
}
text = gimp_lcms_profile_get_model (profile);
text = gimp_color_profile_get_model (profile);
if (text)
{
if (string->len > 0)
......@@ -416,7 +416,7 @@ gimp_lcms_profile_get_summary (GimpColorProfile profile)
g_string_append (string, text);
}
text = gimp_lcms_profile_get_manufacturer (profile);
text = gimp_color_profile_get_manufacturer (profile);
if (text)
{
if (string->len > 0)
......@@ -425,7 +425,7 @@ gimp_lcms_profile_get_summary (GimpColorProfile profile)
g_string_append (string, text);
}
text = gimp_lcms_profile_get_copyright (profile);
text = gimp_color_profile_get_copyright (profile);
if (text)
{
if (string->len > 0)
......@@ -438,7 +438,7 @@ gimp_lcms_profile_get_summary (GimpColorProfile profile)
}
/**
* gimp_lcms_profile_is_equal:
* gimp_color_profile_is_equal:
* @profile1: a #GimpColorProfile
* @profile2: a #GimpColorProfile
*
......@@ -449,7 +449,7 @@ gimp_lcms_profile_get_summary (GimpColorProfile profile)
* Since: 2.10
**/
gboolean
gimp_lcms_profile_is_equal (GimpColorProfile profile1,
gimp_color_profile_is_equal (GimpColorProfile profile1,
GimpColorProfile profile2)
{
cmsUInt8Number digest1[GIMP_LCMS_MD5_DIGEST_LENGTH];
......@@ -471,7 +471,7 @@ gimp_lcms_profile_is_equal (GimpColorProfile profile1,
}
/**
* gimp_lcms_profile_is_rgb:
* gimp_color_profile_is_rgb:
* @profile: a #GimpColorProfile
*
* Return value: %TRUE if the profile's color space is RGB, %FALSE
......@@ -480,7 +480,7 @@ gimp_lcms_profile_is_equal (GimpColorProfile profile1,
* Since: 2.10
**/
gboolean
gimp_lcms_profile_is_rgb (GimpColorProfile profile)
gimp_color_profile_is_rgb (GimpColorProfile profile)
{
g_return_val_if_fail (profile != NULL, FALSE);
......@@ -488,7 +488,7 @@ gimp_lcms_profile_is_rgb (GimpColorProfile profile)
}
/**
* gimp_lcms_profile_is_cmyk:
* gimp_color_profile_is_cmyk:
* @profile: a #GimpColorProfile
*
* Return value: %TRUE if the profile's color space is CMYK, %FALSE
......@@ -497,7 +497,7 @@ gimp_lcms_profile_is_rgb (GimpColorProfile profile)
* Since: 2.10
**/
gboolean
gimp_lcms_profile_is_cmyk (GimpColorProfile profile)
gimp_color_profile_is_cmyk (GimpColorProfile profile)
{
g_return_val_if_fail (profile != NULL, FALSE);
......@@ -505,9 +505,9 @@ gimp_lcms_profile_is_cmyk (GimpColorProfile profile)
}
static void
gimp_lcms_profile_set_tag (cmsHPROFILE profile,
cmsTagSignature sig,
const gchar *tag)
gimp_color_profile_set_tag (cmsHPROFILE profile,
cmsTagSignature sig,
const gchar *tag)
{
cmsMLU *mlu;
......@@ -518,7 +518,7 @@ gimp_lcms_profile_set_tag (cmsHPROFILE profile,
}
static GimpColorProfile
gimp_lcms_create_srgb_profile_internal (void)
gimp_color_profile_new_srgb_internal (void)
{
cmsHPROFILE srgb_profile;
cmsCIExyY d65_srgb_specs = { 0.3127, 0.3290, 1.0 };
......@@ -546,14 +546,14 @@ gimp_lcms_create_srgb_profile_internal (void)
cmsFreeToneCurve (srgb_parametric_curve);
gimp_lcms_profile_set_tag (srgb_profile, cmsSigProfileDescriptionTag,
"GIMP built-in sRGB");
gimp_lcms_profile_set_tag (srgb_profile, cmsSigDeviceMfgDescTag,
"GIMP");
gimp_lcms_profile_set_tag (srgb_profile, cmsSigDeviceModelDescTag,
"sRGB");
gimp_lcms_profile_set_tag (srgb_profile, cmsSigCopyrightTag,
"Public Domain");
gimp_color_profile_set_tag (srgb_profile, cmsSigProfileDescriptionTag,
"GIMP built-in sRGB");
gimp_color_profile_set_tag (srgb_profile, cmsSigDeviceMfgDescTag,
"GIMP");
gimp_color_profile_set_tag (srgb_profile, cmsSigDeviceModelDescTag,
"sRGB");
gimp_color_profile_set_tag (srgb_profile, cmsSigCopyrightTag,
"Public Domain");
/* The following line produces a V2 profile with a point curve TRC.
* Profiles with point curve TRCs can't be used in LCMS2 unbounded
......@@ -569,7 +569,7 @@ gimp_lcms_create_srgb_profile_internal (void)
}
/**
* gimp_lcms_create_srgb_profile:
* gimp_color_profile_new_srgb:
*
* This function is a replacement for cmsCreate_sRGBProfile() and
* returns an sRGB profile that is functionally the same as the
......@@ -600,7 +600,7 @@ gimp_lcms_create_srgb_profile_internal (void)
* Since: 2.10
**/
GimpColorProfile
gimp_lcms_create_srgb_profile (void)
gimp_color_profile_new_srgb (void)
{
static guint8 *profile_data = NULL;
static gsize profile_length = 0;
......@@ -609,19 +609,19 @@ gimp_lcms_create_srgb_profile (void)
{
GimpColorProfile profile;
profile = gimp_lcms_create_srgb_profile_internal ();
profile = gimp_color_profile_new_srgb_internal ();
profile_data = gimp_lcms_profile_save_to_data (profile, &profile_length,
NULL);
profile_data = gimp_color_profile_save_to_data (profile, &profile_length,
NULL);
gimp_lcms_profile_close (profile);
gimp_color_profile_close (profile);
}
return gimp_lcms_profile_open_from_data (profile_data, profile_length, NULL);
return gimp_color_profile_open_from_data (profile_data, profile_length, NULL);
}
static GimpColorProfile
gimp_lcms_create_linear_rgb_profile_internal (void)
gimp_color_profile_new_linear_rgb_internal (void)
{
cmsHPROFILE profile;
......@@ -651,20 +651,20 @@ gimp_lcms_create_linear_rgb_profile_internal (void)
profile = cmsCreateRGBProfile (&whitepoint, &primaries, linear);
cmsFreeToneCurve (linear[0]);
gimp_lcms_profile_set_tag (profile, cmsSigProfileDescriptionTag,
"GIMP built-in Linear RGB");
gimp_lcms_profile_set_tag (profile, cmsSigDeviceMfgDescTag,
"GIMP");
gimp_lcms_profile_set_tag (profile, cmsSigDeviceModelDescTag,
"Linear RGB");
gimp_lcms_profile_set_tag (profile, cmsSigCopyrightTag,
"Public Domain");
gimp_color_profile_set_tag (profile, cmsSigProfileDescriptionTag,
"GIMP built-in Linear RGB");
gimp_color_profile_set_tag (profile, cmsSigDeviceMfgDescTag,
"GIMP");
gimp_color_profile_set_tag (profile, cmsSigDeviceModelDescTag,
"Linear RGB");
gimp_color_profile_set_tag (profile, cmsSigCopyrightTag,
"Public Domain");
return profile;
}
/**
* gimp_lcms_create_linear_rgb_profile:
* gimp_color_profile_new_linear_rgb:
*
* This function creates a profile for babl_model("RGB"). Please
* somebody write someting smarter here.
......@@ -674,7 +674,7 @@ gimp_lcms_create_linear_rgb_profile_internal (void)
* Since: 2.10
**/
GimpColorProfile
gimp_lcms_create_linear_rgb_profile (void)
gimp_color_profile_new_linear_rgb (void)
{
static guint8 *profile_data = NULL;
static gsize profile_length = 0;
...