mirror of https://github.com/GNOME/gimp.git
libgimpcolor: rename RGB and GRAY gimp_color_profile_new_*() functions
to be more consistent, as discussed in bug #756389.
This commit is contained in:
parent
5098338470
commit
a33daf99fe
|
@ -293,7 +293,7 @@ gimp_buffer_new_from_pixbuf (GdkPixbuf *pixbuf,
|
|||
|
||||
if (! profile && gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB)
|
||||
{
|
||||
profile = gimp_color_profile_new_srgb ();
|
||||
profile = gimp_color_profile_new_rgb_srgb ();
|
||||
}
|
||||
|
||||
if (profile)
|
||||
|
|
|
@ -323,7 +323,7 @@ gimp_image_get_builtin_color_profile (GimpImage *image)
|
|||
{
|
||||
if (! linear_gray_profile)
|
||||
{
|
||||
linear_gray_profile = gimp_color_profile_new_linear_gray ();
|
||||
linear_gray_profile = gimp_color_profile_new_gray_srgb_linear ();
|
||||
g_object_add_weak_pointer (G_OBJECT (linear_gray_profile),
|
||||
(gpointer) &linear_gray_profile);
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ gimp_image_get_builtin_color_profile (GimpImage *image)
|
|||
{
|
||||
if (! gray_profile)
|
||||
{
|
||||
gray_profile = gimp_color_profile_new_srgb_gray ();
|
||||
gray_profile = gimp_color_profile_new_gray_srgb ();
|
||||
g_object_add_weak_pointer (G_OBJECT (gray_profile),
|
||||
(gpointer) &gray_profile);
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ gimp_image_get_builtin_color_profile (GimpImage *image)
|
|||
{
|
||||
if (! linear_rgb_profile)
|
||||
{
|
||||
linear_rgb_profile = gimp_color_profile_new_linear_rgb ();
|
||||
linear_rgb_profile = gimp_color_profile_new_rgb_srgb_linear ();
|
||||
g_object_add_weak_pointer (G_OBJECT (linear_rgb_profile),
|
||||
(gpointer) &linear_rgb_profile);
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ gimp_image_get_builtin_color_profile (GimpImage *image)
|
|||
{
|
||||
if (! srgb_profile)
|
||||
{
|
||||
srgb_profile = gimp_color_profile_new_srgb ();
|
||||
srgb_profile = gimp_color_profile_new_rgb_srgb ();
|
||||
g_object_add_weak_pointer (G_OBJECT (srgb_profile),
|
||||
(gpointer) &srgb_profile);
|
||||
}
|
||||
|
@ -696,7 +696,7 @@ _gimp_image_update_color_profile (GimpImage *image,
|
|||
cmsUInt32Number srgb_lcms_format;
|
||||
cmsUInt32Number flags;
|
||||
|
||||
srgb_profile = gimp_color_profile_new_srgb ();
|
||||
srgb_profile = gimp_color_profile_new_rgb_srgb ();
|
||||
|
||||
image_lcms = gimp_color_profile_get_lcms_profile (private->color_profile);
|
||||
srgb_lcms = gimp_color_profile_get_lcms_profile (srgb_profile);
|
||||
|
|
|
@ -206,7 +206,7 @@ gimp_layer_new_from_pixbuf (GdkPixbuf *pixbuf,
|
|||
|
||||
if (! profile && gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB)
|
||||
{
|
||||
profile = gimp_color_profile_new_srgb ();
|
||||
profile = gimp_color_profile_new_rgb_srgb ();
|
||||
}
|
||||
|
||||
gimp_layer_new_convert_buffer (layer, buffer, profile, NULL);
|
||||
|
|
|
@ -668,30 +668,30 @@ gimp_color_profile_can_gegl_copy (GimpColorProfile *src_profile,
|
|||
GimpColorProfile *dest_profile)
|
||||
{
|
||||
static GimpColorProfile *srgb_profile = NULL;
|
||||
static GimpColorProfile *linear_rgb_profile = NULL;
|
||||
static GimpColorProfile *srgb_linear_profile = NULL;
|
||||
static GimpColorProfile *gray_profile = NULL;
|
||||
static GimpColorProfile *linear_gray_profile = NULL;
|
||||
static GimpColorProfile *gray_linear_profile = NULL;
|
||||
|
||||
if (gimp_color_profile_is_equal (src_profile, dest_profile))
|
||||
return TRUE;
|
||||
|
||||
if (! srgb_profile)
|
||||
{
|
||||
srgb_profile = gimp_color_profile_new_srgb ();
|
||||
linear_rgb_profile = gimp_color_profile_new_linear_rgb ();
|
||||
gray_profile = gimp_color_profile_new_srgb_gray ();
|
||||
linear_gray_profile = gimp_color_profile_new_linear_gray ();
|
||||
srgb_profile = gimp_color_profile_new_rgb_srgb ();
|
||||
srgb_linear_profile = gimp_color_profile_new_rgb_srgb_linear ();
|
||||
gray_profile = gimp_color_profile_new_gray_srgb ();
|
||||
gray_linear_profile = gimp_color_profile_new_gray_srgb_linear ();
|
||||
}
|
||||
|
||||
if ((gimp_color_profile_is_equal (src_profile, srgb_profile) ||
|
||||
gimp_color_profile_is_equal (src_profile, linear_rgb_profile) ||
|
||||
gimp_color_profile_is_equal (src_profile, srgb_linear_profile) ||
|
||||
gimp_color_profile_is_equal (src_profile, gray_profile) ||
|
||||
gimp_color_profile_is_equal (src_profile, linear_gray_profile))
|
||||
gimp_color_profile_is_equal (src_profile, gray_linear_profile))
|
||||
&&
|
||||
(gimp_color_profile_is_equal (dest_profile, srgb_profile) ||
|
||||
gimp_color_profile_is_equal (dest_profile, linear_rgb_profile) ||
|
||||
gimp_color_profile_is_equal (dest_profile, srgb_linear_profile) ||
|
||||
gimp_color_profile_is_equal (dest_profile, gray_profile) ||
|
||||
gimp_color_profile_is_equal (dest_profile, linear_gray_profile)))
|
||||
gimp_color_profile_is_equal (dest_profile, gray_linear_profile)))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
|
|
|
@ -197,7 +197,7 @@ gimp_image_metadata_load_finish (gint32 image_ID,
|
|||
break;
|
||||
|
||||
case GIMP_METADATA_COLORSPACE_ADOBERGB:
|
||||
profile = gimp_color_profile_new_adobe_rgb ();
|
||||
profile = gimp_color_profile_new_rgb_adobe ();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -961,7 +961,7 @@ gimp_color_profile_new_linear_gamma_from_color_profile (GimpColorProfile *profil
|
|||
}
|
||||
|
||||
static cmsHPROFILE *
|
||||
gimp_color_profile_new_srgb_internal (void)
|
||||
gimp_color_profile_new_rgb_srgb_internal (void)
|
||||
{
|
||||
cmsHPROFILE profile;
|
||||
|
||||
|
@ -1018,7 +1018,7 @@ gimp_color_profile_new_srgb_internal (void)
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_color_profile_new_srgb:
|
||||
* gimp_color_profile_new_rgb_srgb:
|
||||
*
|
||||
* This function is a replacement for cmsCreate_sRGBProfile() and
|
||||
* returns an sRGB profile that is functionally the same as the
|
||||
|
@ -1049,7 +1049,7 @@ gimp_color_profile_new_srgb_internal (void)
|
|||
* Since: 2.10
|
||||
**/
|
||||
GimpColorProfile *
|
||||
gimp_color_profile_new_srgb (void)
|
||||
gimp_color_profile_new_rgb_srgb (void)
|
||||
{
|
||||
static GimpColorProfile *profile = NULL;
|
||||
|
||||
|
@ -1058,7 +1058,7 @@ gimp_color_profile_new_srgb (void)
|
|||
|
||||
if (G_UNLIKELY (profile == NULL))
|
||||
{
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_srgb_internal ();
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_rgb_srgb_internal ();
|
||||
|
||||
profile = gimp_color_profile_new_from_lcms_profile (lcms_profile, NULL);
|
||||
|
||||
|
@ -1071,7 +1071,7 @@ gimp_color_profile_new_srgb (void)
|
|||
}
|
||||
|
||||
static cmsHPROFILE
|
||||
gimp_color_profile_new_linear_rgb_internal (void)
|
||||
gimp_color_profile_new_rgb_srgb_linear_internal (void)
|
||||
{
|
||||
cmsHPROFILE profile;
|
||||
|
||||
|
@ -1114,7 +1114,7 @@ gimp_color_profile_new_linear_rgb_internal (void)
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_color_profile_new_linear_rgb:
|
||||
* gimp_color_profile_new_rgb_srgb_linear:
|
||||
*
|
||||
* This function creates a profile for babl_model("RGB"). Please
|
||||
* somebody write someting smarter here.
|
||||
|
@ -1124,7 +1124,7 @@ gimp_color_profile_new_linear_rgb_internal (void)
|
|||
* Since: 2.10
|
||||
**/
|
||||
GimpColorProfile *
|
||||
gimp_color_profile_new_linear_rgb (void)
|
||||
gimp_color_profile_new_rgb_srgb_linear (void)
|
||||
{
|
||||
static GimpColorProfile *profile = NULL;
|
||||
|
||||
|
@ -1133,7 +1133,7 @@ gimp_color_profile_new_linear_rgb (void)
|
|||
|
||||
if (G_UNLIKELY (profile == NULL))
|
||||
{
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_linear_rgb_internal ();
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_rgb_srgb_linear_internal ();
|
||||
|
||||
profile = gimp_color_profile_new_from_lcms_profile (lcms_profile, NULL);
|
||||
|
||||
|
@ -1146,7 +1146,7 @@ gimp_color_profile_new_linear_rgb (void)
|
|||
}
|
||||
|
||||
static cmsHPROFILE *
|
||||
gimp_color_profile_new_adobe_rgb_internal (void)
|
||||
gimp_color_profile_new_rgb_adobe_internal (void)
|
||||
{
|
||||
cmsHPROFILE profile;
|
||||
|
||||
|
@ -1194,7 +1194,7 @@ gimp_color_profile_new_adobe_rgb_internal (void)
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_color_profile_new_adobe_rgb:
|
||||
* gimp_color_profile_new_rgb_adobe:
|
||||
*
|
||||
* This function creates a profile compatible with AbobeRGB (1998).
|
||||
*
|
||||
|
@ -1203,7 +1203,7 @@ gimp_color_profile_new_adobe_rgb_internal (void)
|
|||
* Since: 2.10
|
||||
**/
|
||||
GimpColorProfile *
|
||||
gimp_color_profile_new_adobe_rgb (void)
|
||||
gimp_color_profile_new_rgb_adobe (void)
|
||||
{
|
||||
static GimpColorProfile *profile = NULL;
|
||||
|
||||
|
@ -1212,7 +1212,7 @@ gimp_color_profile_new_adobe_rgb (void)
|
|||
|
||||
if (G_UNLIKELY (profile == NULL))
|
||||
{
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_adobe_rgb_internal ();
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_rgb_adobe_internal ();
|
||||
|
||||
profile = gimp_color_profile_new_from_lcms_profile (lcms_profile, NULL);
|
||||
|
||||
|
@ -1225,7 +1225,7 @@ gimp_color_profile_new_adobe_rgb (void)
|
|||
}
|
||||
|
||||
static cmsHPROFILE *
|
||||
gimp_color_profile_new_srgb_gray_internal (void)
|
||||
gimp_color_profile_new_gray_srgb_internal (void)
|
||||
{
|
||||
cmsHPROFILE profile;
|
||||
|
||||
|
@ -1255,7 +1255,7 @@ gimp_color_profile_new_srgb_gray_internal (void)
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_color_profile_new_srgb_gray
|
||||
* gimp_color_profile_new_gray_srgb
|
||||
*
|
||||
* This function creates a grayscale #GimpColorProfile with an
|
||||
* sRGB TRC. See gimp_color_profile_new_srgb().
|
||||
|
@ -1265,7 +1265,7 @@ gimp_color_profile_new_srgb_gray_internal (void)
|
|||
* Since: 2.10
|
||||
**/
|
||||
GimpColorProfile *
|
||||
gimp_color_profile_new_srgb_gray (void)
|
||||
gimp_color_profile_new_gray_srgb (void)
|
||||
{
|
||||
static GimpColorProfile *profile = NULL;
|
||||
|
||||
|
@ -1274,7 +1274,7 @@ gimp_color_profile_new_srgb_gray (void)
|
|||
|
||||
if (G_UNLIKELY (profile == NULL))
|
||||
{
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_srgb_gray_internal ();
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_gray_srgb_internal ();
|
||||
|
||||
profile = gimp_color_profile_new_from_lcms_profile (lcms_profile, NULL);
|
||||
|
||||
|
@ -1287,7 +1287,7 @@ gimp_color_profile_new_srgb_gray (void)
|
|||
}
|
||||
|
||||
static cmsHPROFILE
|
||||
gimp_color_profile_new_linear_gray_internal (void)
|
||||
gimp_color_profile_new_gray_srgb_linear_internal (void)
|
||||
{
|
||||
cmsHPROFILE profile;
|
||||
|
||||
|
@ -1313,7 +1313,7 @@ gimp_color_profile_new_linear_gray_internal (void)
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_color_profile_new_linear_gray:
|
||||
* gimp_color_profile_new_gray_srgb_linear_gray:
|
||||
*
|
||||
* This function creates a profile for babl_model("Y"). Please
|
||||
* somebody write someting smarter here.
|
||||
|
@ -1323,7 +1323,7 @@ gimp_color_profile_new_linear_gray_internal (void)
|
|||
* Since: 2.10
|
||||
**/
|
||||
GimpColorProfile *
|
||||
gimp_color_profile_new_linear_gray (void)
|
||||
gimp_color_profile_new_gray_srgb_linear (void)
|
||||
{
|
||||
static GimpColorProfile *profile = NULL;
|
||||
|
||||
|
@ -1332,7 +1332,7 @@ gimp_color_profile_new_linear_gray (void)
|
|||
|
||||
if (G_UNLIKELY (profile == NULL))
|
||||
{
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_linear_gray_internal ();
|
||||
cmsHPROFILE lcms_profile = gimp_color_profile_new_gray_srgb_linear_internal ();
|
||||
|
||||
profile = gimp_color_profile_new_from_lcms_profile (lcms_profile, NULL);
|
||||
|
||||
|
|
|
@ -64,12 +64,12 @@ struct _GimpColorProfileClass
|
|||
|
||||
GType gimp_color_profile_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpColorProfile * gimp_color_profile_new_srgb (void);
|
||||
GimpColorProfile * gimp_color_profile_new_linear_rgb (void);
|
||||
GimpColorProfile * gimp_color_profile_new_adobe_rgb (void);
|
||||
GimpColorProfile * gimp_color_profile_new_rgb_srgb (void);
|
||||
GimpColorProfile * gimp_color_profile_new_rgb_srgb_linear (void);
|
||||
GimpColorProfile * gimp_color_profile_new_rgb_adobe (void);
|
||||
|
||||
GimpColorProfile * gimp_color_profile_new_srgb_gray (void);
|
||||
GimpColorProfile * gimp_color_profile_new_linear_gray (void);
|
||||
GimpColorProfile * gimp_color_profile_new_gray_srgb (void);
|
||||
GimpColorProfile * gimp_color_profile_new_gray_srgb_linear (void);
|
||||
|
||||
GimpColorProfile *
|
||||
gimp_color_profile_new_srgb_gamma_from_color_profile (GimpColorProfile *profile);
|
||||
|
|
|
@ -473,7 +473,7 @@ get_display_profile (GtkWidget *widget,
|
|||
profile = gimp_color_config_get_display_color_profile (config, NULL);
|
||||
|
||||
if (! profile)
|
||||
profile = gimp_color_profile_new_srgb ();
|
||||
profile = gimp_color_profile_new_rgb_srgb ();
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
|
|
@ -631,7 +631,7 @@ jpeg_load_cmyk_transform (guint8 *profile_data,
|
|||
}
|
||||
|
||||
/* always convert to sRGB */
|
||||
rgb_profile = gimp_color_profile_new_srgb ();
|
||||
rgb_profile = gimp_color_profile_new_rgb_srgb ();
|
||||
|
||||
cmyk_lcms = gimp_color_profile_get_lcms_profile (cmyk_profile);
|
||||
rgb_lcms = gimp_color_profile_get_lcms_profile (rgb_profile);
|
||||
|
|
Loading…
Reference in New Issue