/** * gimp_color_profile_new_linear_rgb: * * This function creates a profile for babl_model("RGB"). Please * somebody write someting smarter here. * * Return value: the linear RGB cmsHPROFILE. * * Since: 2.10 **/ GimpColorProfile gimp_color_profile_new_linear_rgb (void) { static guint8 *profile_data = NULL; static gsize profile_length = 0; if (G_UNLIKELY (profile_data == NULL)) { GimpColorProfile profile; profile = gimp_color_profile_new_linear_rgb_internal (); profile_data = gimp_color_profile_save_to_data (profile, &profile_length, NULL); gimp_color_profile_close (profile); } return gimp_color_profile_open_from_data (profile_data, profile_length, NULL); }
/** * gimp_color_profile_new_linear_rgb: * * This function creates a profile for babl_model("RGB"). Please * somebody write someting smarter here. * * Return value: the linear RGB #GimpColorProfile. * * Since: 2.10 **/ GimpColorProfile * gimp_color_profile_new_linear_rgb (void) { static GimpColorProfile *profile = NULL; const guint8 *data; gsize length; if (G_UNLIKELY (profile == NULL)) { cmsHPROFILE lcms_profile = gimp_color_profile_new_linear_rgb_internal (); profile = gimp_color_profile_new_from_lcms_profile (lcms_profile, NULL); cmsCloseProfile (lcms_profile); } data = gimp_color_profile_get_icc_profile (profile, &length); return gimp_color_profile_new_from_icc_profile (data, length, NULL); }