mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
app,libgimpcolor: drop babl if guards that no longer apply
This commit is contained in:
parent
da289b9c50
commit
a93fbc682e
4 changed files with 1 additions and 36 deletions
|
@ -1957,15 +1957,7 @@ gimp_context_get_rgba_format (GimpContext *context,
|
|||
*space_image = image;
|
||||
}
|
||||
|
||||
if (color != NULL &&
|
||||
(space == NULL ||
|
||||
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION == 1 && BABL_MICRO_VERSION >= 107)
|
||||
! babl_space_is_rgb (space) ||
|
||||
#else
|
||||
babl_space_is_cmyk (space) ||
|
||||
babl_space_is_gray (space) ||
|
||||
#endif
|
||||
FALSE))
|
||||
if (color != NULL && (space == NULL || ! babl_space_is_rgb (space)))
|
||||
{
|
||||
format = gegl_color_get_format (color);
|
||||
space = babl_format_get_space (format);
|
||||
|
@ -1973,11 +1965,7 @@ gimp_context_get_rgba_format (GimpContext *context,
|
|||
*space_image = NULL;
|
||||
}
|
||||
|
||||
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION == 1 && BABL_MICRO_VERSION >= 107)
|
||||
if (! babl_space_is_rgb (space))
|
||||
#else
|
||||
if (babl_space_is_cmyk (space) || babl_space_is_gray (space))
|
||||
#endif
|
||||
{
|
||||
format = NULL;
|
||||
space = NULL;
|
||||
|
|
|
@ -150,11 +150,7 @@ gimp_text_layout_new (GimpText *text,
|
|||
pango_font_description_free (font_desc);
|
||||
|
||||
target_space = gimp_image_get_layer_space (target_image);
|
||||
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION == 1 && BABL_MICRO_VERSION >= 107)
|
||||
if (babl_space_is_rgb (target_space) || babl_space_is_gray (target_space))
|
||||
#else
|
||||
if (! babl_space_is_cmyk (target_space))
|
||||
#endif
|
||||
layout->layout_space = target_space;
|
||||
else
|
||||
layout->layout_space = NULL;
|
||||
|
|
|
@ -858,11 +858,7 @@ gimp_color_frame_update (GimpColorFrame *frame)
|
|||
|
||||
case GIMP_COLOR_PICK_MODE_RGB_PERCENT:
|
||||
case GIMP_COLOR_PICK_MODE_RGB_U8:
|
||||
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION == 1 && BABL_MICRO_VERSION >= 107)
|
||||
if (babl_space_is_gray (space) || babl_space_is_rgb (space))
|
||||
#else
|
||||
if (! babl_space_is_cmyk (space))
|
||||
#endif
|
||||
color_profile = gimp_babl_format_get_color_profile (format);
|
||||
|
||||
/* TRANSLATORS: R for Red (RGB) */
|
||||
|
@ -935,11 +931,7 @@ gimp_color_frame_update (GimpColorFrame *frame)
|
|||
break;
|
||||
|
||||
case GIMP_COLOR_PICK_MODE_GRAYSCALE:
|
||||
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION == 1 && BABL_MICRO_VERSION >= 107)
|
||||
if (babl_space_is_gray (space) || babl_space_is_rgb (space))
|
||||
#else
|
||||
if (! babl_space_is_cmyk (space))
|
||||
#endif
|
||||
color_profile = gimp_babl_format_get_color_profile (format);
|
||||
|
||||
/* TRANSLATORS: V for Value (grayscale) */
|
||||
|
|
|
@ -335,17 +335,6 @@ gimp_babl_format_get_with_alpha (const Babl *format)
|
|||
|
||||
model = babl_get_name (babl_format_get_model (format));
|
||||
|
||||
/* Special-cased because babl_format_has_alpha() doesn't see that these
|
||||
* formats encode alpha. This has been fixed with commit a28309c.
|
||||
* TODO: remove this test when babl 0.1.110 is released and we depend on it.
|
||||
*/
|
||||
#if BABL_MINOR_VERSION == 1 && BABL_MICRO_VERSION <= 108
|
||||
if (g_strcmp0 (model, "HCYA") == 0 ||
|
||||
g_strcmp0 (model, "HSLA") == 0 ||
|
||||
g_strcmp0 (model, "HSVA") == 0)
|
||||
return format;
|
||||
#endif
|
||||
|
||||
/* Assuming we use Babl formats with same type for all components. */
|
||||
type = babl_get_name (babl_format_get_type (format, 0));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue