Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • janitor-team/proposed/gegl
  • gnome-team/gegl
2 results
Show changes
Commits on Source (78)
Showing
with 479 additions and 40 deletions
GEGL-0.4.46 2023-06-1x
GEGL=0.4.48 2024-02-11
Core:
GeglColor extended with GBytes API, and space aware accesors for RGB
and CMYK. Better runtime handling of mismatched GEGL ops in graphs.
Build:
Use gi-docgen
Updated vendored libraries
ctx has been updated from upstream.
Operations:
• dropshadow: Fix shrinking with negative-grow radius.
• mantiuk: opt out of OpenMP when building with clang.
• voroni: fix crash.
• shuffle-search: in progress (in workshop, not built by default)
brute-force dither optimizer.
Contributors to this release
Alan Mortensen, Anders Jonsson, Andre Klapper, Andre Klapper, Asier
Sarasua Garmendia, dimspingos, Ekaterine Papava, Jacob Boerema, Jan
Tojnar, Jehan, Jordi Mas, Luming Zh, Marco Ciampa, Martin, Øyvind
Kolås, Piotr Drąg, Rodrigo Lledó, Sabri Ünal, Víttor Paulo Vieira da
Costa, woob and Yuri Chornoivan,
GEGL-0.4.46 2023-06-26
Core:
......@@ -8,19 +42,23 @@ by autosensing the neccesary direction of the connection.
Operations:
Clean up various bits of ill or undefiend code based on stricter
compiler warnings.
GIMP has now started looking at the "gimp:menu-path" key among the GEGL
operation class key/value pairs, and putting operations in the
corresponding menu.
Use gegl_node_connect in all ops.
• local-threshold: new operation that does neighborhood aware and
optionally antialiased thresholding of an image. The operation is
equivalent to doing an unsharp mask with a large radius, followed
by scaling the image up applying threshold and scaling down by the
inverse of the scale up factor.
ff-load,ff-save: clean up of deprecated API - hope fully covering more
ffmpeg versions.
• chamfer: new operation in workshop that useis distance-transform
and emboss or LinuxBeaver’s research into modeling different bevels
with combinations of blurs.
New operation: adaptive-threshold, this is equivalent to doing an
unsharp mask with a large radius, followed by scaling the image up
applying threshold and scaling down by the inverse. The scalings are
only done if antialias is higher than 1. To speed up processing the
first thing done in the graph is conversion to grayscale.
• ff-load,ff-save: clean up of deprecated API, builds with ffmpeg-6.0
but ff-save hasn’t been made to work with this release of ffmpeg
yet.
Updated vendored libraries
......@@ -36,9 +74,9 @@ Build:
Contributors to this release
Alexandre Prokoudine, Asier Sarasua Garmendia, Ekaterine Papava, Marco
Ciampa, Martin, Øyvind Kolås, Piotr Drąg, Rodrigo Lledó, Sabri Ünal,
Yuri Chornoivan
Alexandre Prokoudine, Asier Sarasua Garmendia, Ekaterine Papava,
LinuxBeaver, Marco Ciampa, Martin, Øyvind Kolås, Piotr Drąg, Rodrigo
Lledó, Sabri Ünal, Yuri Chornoivan.
GEGL-0.4.44 2023-03-26
......@@ -2225,4 +2263,4 @@ Calvin Williamson, Caroline Dahloff Daniel Rogers, Garry R. Osgood, Jay
Cox and Sven Neumann
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Last updated 2023-06-13 16:26:06 CEST
Last updated 2024-02-11 22:11:25 CET
GEGL=0.4.48 2024-02-11
----------------------
Core:
~~~~~
GeglColor extended with GBytes API, and space aware accesors for RGB and CMYK.
Better runtime handling of mismatched GEGL ops in graphs.
Build:
~~~~~
Use gi-docgen
Updated vendored libraries
~~~~~~~~~~~~~~~~~~~~~~~~~~
ctx has been updated from upstream.
Operations:
~~~~~~~~~~~
- dropshadow: Fix shrinking with negative-grow radius.
- mantiuk: opt out of OpenMP when building with clang.
- voroni: fix crash.
- shuffle-search: in progress (in workshop, not built by default) brute-force
dither optimizer.
Contributors to this release
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Alan Mortensen, Anders Jonsson, Andre Klapper, Andre Klapper, Asier Sarasua
Garmendia, dimspingos, Ekaterine Papava, Jacob Boerema, Jan Tojnar, Jehan,
Jordi Mas, Luming Zh, Marco Ciampa, Martin, Øyvind Kolås, Piotr Drąg, Rodrigo
Lledó, Sabri Ünal, Víttor Paulo Vieira da Costa, woob and Yuri Chornoivan,
GEGL-0.4.46 2023-06-26
----------------------
......
[library]
namespace = "GEGL"
version = "@GEGL_VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/gegl/"
repository_url = "https://gitlab.gnome.org/GNOME/gegl.git"
website_url = "https://www.gegl.org/"
authors = "GEGL contributors"
logo_url = "@GEGL_LOGO_PATH@"
license = "LGPL-3.0-or-later"
description = "GEGL library"
dependencies = [
]
devhelp = true
search_index = true
[dependencies."Babl-0.1"]
name = "Babl"
description = "Pixel encoding and color space conversion engine"
docs_url = "https://gegl.org/babl"
[dependencies."GLib-2.0"]
name = "GLib"
description = "C Utility Library"
docs_url = "https://developer.gnome.org/glib/stable"
[dependencies."GObject-2.0"]
name = "GObject"
description = "The base type system library"
docs_url = "https://developer.gnome.org/gobject/stable"
[dependencies."Gio-2.0"]
name = "Gio"
description = "GObject interfaces and objects"
docs_url = "https://developer.gnome.org/gio/stable"
[theme]
name = "basic"
show_index_summary = true
show_class_hierarchy = true
[source-location]
base_url = "https://gitlab.gnome.org/GNOME/gegl/-/blob/master/"
[extra]
content_files = [
]
urlmap_file = "urlmap.js"
......@@ -3,7 +3,7 @@ glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
glib_gtk_docdir = glib_prefix / 'share' / 'gtk-doc' / 'html'
# GTK doc
if gtkdoc_scan.found()
if get_option('gtk-doc')
gnome.gtkdoc(
'gegl',
dependencies: gegl_lib,
......@@ -19,3 +19,43 @@ if gtkdoc_scan.found()
install : true,
)
endif
# GI-docgen
if build_gi_docgen
# Extra markdown files
gegl_doc_content_files = [
]
gegl_doc_toml = configure_file(
input: 'gegl.toml.in',
output: '@BASENAME@',
configuration: {
'GEGL_VERSION': version,
'GEGL_LOGO_PATH': 'https://gegl.org/images/GEGL.png',
},
)
gegl_docs = custom_target('gegl-docs',
input: gegl_gir[0],
output: api_name,
command: [
gi_docgen,
'generate',
'--quiet',
'--fatal-warnings',
'--config', gegl_doc_toml,
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'--add-include-path=@0@'.format(get_option('prefix') / 'share' / 'gir-1.0'),
'@INPUT@',
],
depend_files: [
gegl_doc_toml,
gegl_doc_content_files,
],
build_by_default: true,
install: true,
install_dir: get_option('datadir') / 'doc',
)
endif
// A map between namespaces and base URLs for their online gi-docgen documentation
baseURLs = [
[ 'Babl', 'https://developer.gimp.org/api/babl/' ],
[ 'GLib', 'https://docs.gtk.org/glib/' ],
[ 'GObject', 'https://docs.gtk.org/gobject/' ],
[ 'Gio', 'https://docs.gtk.org/gio/' ],
]
......@@ -12,13 +12,13 @@
<description xml:lang="en">GEGL (Generic Graphics Library) is a graph based image processing framework.</description>
<description xml:lang="de">GEGL (Generic Graphics Library) ist ein graph-basiertes Framework für die Bildverarbeitung.</description>
<homepage rdf:resource="http://www.gegl.org" />
<homepage rdf:resource="https://www.gegl.org" />
<mailing-list
rdf:resource="https://mail.gnome.org/mailman/listinfo/gegl-developer-list"
<developer-forum
rdf:resource="https://discourse.gnome.org/tag/gegl"
/>
<download-page rdf:resource="http://www.gegl.org/#_download" />
<download-page rdf:resource="https://www.gegl.org/#_download" />
<bug-database
rdf:resource="https://gitlab.gnome.org/GNOME/gegl/issues/"
......
......@@ -227,7 +227,7 @@ gegl_sampler_cubic_get ( GeglSampler *self,
gegl_sampler_cubic_interpolate (self, absolute_x, absolute_y, result,
repeat_mode);
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 90)
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION ==1 && BABL_MICRO_VERSION >= 90)
self->fish_process (self->fish, (void*)result, (void*)output, 1, NULL);
#else
babl_process (self->fish, (void*)result, (void*)output, 1);
......
......@@ -194,7 +194,7 @@ gegl_sampler_linear_get ( GeglSampler *self,
gegl_sampler_linear_interpolate (self, absolute_x, absolute_y, result,
repeat_mode);
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 90)
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION ==1 && BABL_MICRO_VERSION >= 90)
self->fish_process (self->fish, (void*)result, (void*)output, 1, NULL);
#else
babl_process (self->fish, (void*)result, (void*)output, 1);
......
......@@ -998,7 +998,7 @@ gegl_sampler_lohalo_get ( GeglSampler* restrict self,
/*
* Ship out the result:
*/
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 90)
#if BABL_MINOR_VERSION>1 || (BABL_MINOR_VERSION==1 && BABL_MICRO_VERSION >= 90)
self->fish_process (self->fish, (void*)newval, (void*)output, 1, NULL);
#else
babl_process (self->fish, (void*)newval, (void*)output, 1);
......
......@@ -195,7 +195,7 @@ gegl_sampler_get_pixel (GeglSampler *sampler,
tp = gegl_tile_get_data (tile) +
(offsety * tile_width + offsetx) * nearest_sampler->buffer_bpp;
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 90)
#if BABL_MINOR_VERSION>1 || (BABL_MINOR_VERSION==1 && BABL_MICRO_VERSION >= 90)
sampler->fish_process (sampler->fish, (void*)tp, (void*)buf, 1, NULL);
#else
babl_process (sampler->fish, (void*)tp, (void*)buf, 1);
......@@ -228,7 +228,7 @@ gegl_sampler_nearest_prepare (GeglSampler* restrict sampler)
GEGL_SAMPLER_NEAREST (sampler)->buffer_bpp = babl_format_get_bytes_per_pixel (sampler->buffer->format);
sampler->fish = babl_fish (sampler->buffer->soft_format, sampler->format);
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 90)
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION ==1 && BABL_MICRO_VERSION >= 90)
sampler->fish_process = babl_fish_get_process (sampler->fish);
#endif
}
......@@ -1920,7 +1920,7 @@ gegl_sampler_nohalo_get ( GeglSampler* restrict self,
/*
* Ship out the result:
*/
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 90)
#if BABL_MINOR_VERSION>1 || (BABL_MINOR_VERSION==1 && BABL_MICRO_VERSION >= 90)
self->fish_process (self->fish, (void*)newval, (void*)output, 1, NULL);
#else
babl_process (self->fish, (void*)newval, (void*)output, 1);
......
......@@ -267,7 +267,7 @@ gegl_sampler_prepare (GeglSampler *self)
if (!self->fish)
{
self->fish = babl_fish (self->interpolate_format, self->format);
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 90)
#if BABL_MINOR_VERSION>1 || (BABL_MINOR_VERSION==1 && BABL_MICRO_VERSION >= 90)
self->fish_process = babl_fish_get_process (self->fish);
#endif
}
......
......@@ -90,7 +90,7 @@ struct _GeglSampler
gint interpolate_components;
GeglSamplerLevel level[GEGL_SAMPLER_MIPMAP_LEVELS];
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 90)
#if BABL_MINOR_VERSION>1 || (BABL_MINOR_VERSION==1 && BABL_MICRO_VERSION >= 90)
BablFishProcess fish_process;
#endif
};
......
......@@ -141,7 +141,7 @@ GEGL_NOTE (guint type, const char *format, ...)
{
gchar *formatted;
va_start (args, format);
formatted = g_strdup_printf (format, args);
formatted = g_strdup_vprintf (format, args);
g_message ("[ %s ] " G_STRLOC ": %s",
gegl_lookup_debug_string (type), formatted);
g_free (formatted);
......@@ -158,7 +158,7 @@ GEGL_TIMESTAMP (guint type, const char *format, ...)
{
gchar *formatted;
va_start (args, format);
formatted = g_strdup_printf (format, args);
formatted = g_strdup_vprintf (format, args);
g_message ("[ %s ] %"G_GINT64_FORMAT": " G_STRLOC ": %s",
gegl_lookup_debug_string (type), gegl_get_timestamp(),
formatted);
......
......@@ -165,7 +165,7 @@ gboolean gegl_is_main_thread (void)
return g_thread_self () == main_thread;
}
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 97)
#if BABL_MINOR_VERSION>1 || (BABL_MINOR_VERSION==1 && BABL_MICRO_VERSION >= 90)
static gboolean gegl_idle_gc (gpointer user_data)
{
babl_gc ();
......@@ -203,7 +203,7 @@ gegl_init (gint *argc,
g_option_context_free (context);
#if (BABL_MINOR_VERSION >=1) && (BABL_MICRO_VERSION >= 97)
#if BABL_MINOR_VERSION>1 || (BABL_MINOR_VERSION==1 && BABL_MICRO_VERSION >= 97)
g_timeout_add_seconds (10, gegl_idle_gc, NULL);
#endif
}
......
......@@ -152,7 +152,11 @@ gegl_matrix3_copy_into (GeglMatrix3 *dst,
GeglMatrix3 *
gegl_matrix3_copy (const GeglMatrix3 *matrix)
{
#if GLIB_CHECK_VERSION(2,68,0)
return (GeglMatrix3 *) g_memdup2 (matrix, sizeof (GeglMatrix3));
#else
return (GeglMatrix3 *) g_memdup (matrix, sizeof (GeglMatrix3));
#endif
}
gdouble
......
......@@ -894,7 +894,6 @@ gegl_serialize2 (GeglNode *start,
GHashTable *ht,
GeglSerializeFlag flags)
{
char *ret = NULL;
gboolean trim_defaults = flags & GEGL_SERIALIZE_TRIM_DEFAULTS;
gboolean bake_anim = flags & GEGL_SERIALIZE_BAKE_ANIM;
GeglNode *iter;
......@@ -1238,11 +1237,7 @@ gegl_serialize2 (GeglNode *start,
iter = gegl_node_get_producer (iter, "input", NULL);
}
}
ret = str->str;
g_string_free (str, FALSE);
return ret;
return g_string_free (str, FALSE);
}
gchar *
......
......@@ -792,7 +792,11 @@ gegl_node_invalidated (GeglNode *node,
rects = g_hash_table_new_full (NULL, NULL, NULL, g_free);
#if GLIB_CHECK_VERSION(2,68,0)
g_hash_table_insert (rects, node, g_memdup2 (rect, sizeof (GeglRectangle)));
#else
g_hash_table_insert (rects, node, g_memdup (rect, sizeof (GeglRectangle)));
#endif
visitor = gegl_callback_visitor_new (gegl_node_invalidated_invalidate_node,
rects);
......@@ -880,6 +884,13 @@ gegl_node_connect (GeglNode *source,
return FALSE;
GeglPad *pad_sink = gegl_node_get_pad (sink, sink_pad_name);
if (pad_sink == NULL)
{
g_warning ("%s: the sink node '%s' doesn't have a pad named '%s', bailing.\n",
G_STRFUNC, gegl_node_get_debug_name (sink), sink_pad_name);
return FALSE;
}
if (!gegl_pad_is_input (pad_sink))
{
{ GeglNode *tmp = source;
......
......@@ -41,7 +41,11 @@ struct _GeglColorPrivate
union
{
guint8 pixel[40];
/* Some babl code (SSE2 codepath in particular) requires source address to
* be 16-byte aligned and would crash otherwise.
* See: https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/142
*/
guint8 pixel[48] __attribute__((aligned(16)));
gdouble alignment;
};
};
......@@ -310,6 +314,48 @@ gegl_color_get_pixel (GeglColor *color,
color->priv->pixel, pixel, 1);
}
void
gegl_color_set_bytes (GeglColor *color,
const Babl *format,
GBytes *bytes)
{
gint bpp;
g_return_if_fail (GEGL_IS_COLOR (color));
g_return_if_fail (format);
g_return_if_fail (bytes);
bpp = babl_format_get_bytes_per_pixel (format);
g_return_if_fail (g_bytes_get_size (bytes) == bpp);
if (bpp <= sizeof (color->priv->pixel))
color->priv->format = format;
else
color->priv->format = gegl_babl_rgba_linear_float ();
babl_process (babl_fish (format, color->priv->format),
g_bytes_get_data (bytes, NULL), color->priv->pixel, 1);
}
GBytes *
gegl_color_get_bytes (GeglColor *color,
const Babl *format)
{
guint8 *data;
gint bpp;
g_return_val_if_fail (GEGL_IS_COLOR (color), NULL);
g_return_val_if_fail (format, NULL);
bpp = babl_format_get_bytes_per_pixel (format);
data = g_malloc0 (bpp);
babl_process (babl_fish (color->priv->format, format),
color->priv->pixel, data, 1);
return g_bytes_new_take (data, bpp);
}
void
gegl_color_set_rgba (GeglColor *self,
gdouble r,
......@@ -343,6 +389,99 @@ gegl_color_get_rgba (GeglColor *self,
if (a) *a = rgba[3];
}
void
gegl_color_set_rgba_with_space (GeglColor *self,
gdouble r,
gdouble g,
gdouble b,
gdouble a,
const Babl *space)
{
const Babl *format = babl_format_with_space ("R'G'B'A float", space);
const gfloat rgba[4] = {r, g, b, a};
space = babl_format_get_space (format);
g_return_if_fail (GEGL_IS_COLOR (self));
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION == 1 && BABL_MICRO_VERSION >= 107)
g_return_if_fail (space == NULL || babl_space_is_rgb (space));
#else
g_return_if_fail (space == NULL || (! babl_space_is_cmyk (space) && ! babl_space_is_gray (space)));
#endif
gegl_color_set_pixel (self, format, rgba);
}
void
gegl_color_get_rgba_with_space (GeglColor *self,
gdouble *r,
gdouble *g,
gdouble *b,
gdouble *a,
const Babl *space)
{
const Babl *format = babl_format_with_space ("R'G'B'A float", space);
gfloat rgba[4];
space = babl_format_get_space (format);
g_return_if_fail (GEGL_IS_COLOR (self));
#if BABL_MINOR_VERSION > 1 || (BABL_MINOR_VERSION == 1 && BABL_MICRO_VERSION >= 107)
g_return_if_fail (space == NULL || babl_space_is_rgb (space));
#else
g_return_if_fail (space == NULL || (! babl_space_is_cmyk (space) && ! babl_space_is_gray (space)));
#endif
gegl_color_get_pixel (self, format, rgba);
if (r) *r = rgba[0];
if (g) *g = rgba[1];
if (b) *b = rgba[2];
if (a) *a = rgba[3];
}
void
gegl_color_set_cmyk (GeglColor *self,
gdouble c,
gdouble m,
gdouble y,
gdouble k,
gdouble a,
const Babl *space)
{
const Babl *format = babl_format_with_space ("CMYK float", space);
const gfloat cmyk[5] = {c, m, y, k, a};
g_return_if_fail (GEGL_IS_COLOR (self));
g_return_if_fail (space == NULL || babl_format_get_space (format));
gegl_color_set_pixel (self, format, cmyk);
}
void
gegl_color_get_cmyk (GeglColor *self,
gdouble *c,
gdouble *m,
gdouble *y,
gdouble *k,
gdouble *a,
const Babl *space)
{
const Babl *format = babl_format_with_space ("CMYK float", space);
gfloat cmyk[5];
g_return_if_fail (GEGL_IS_COLOR (self));
g_return_if_fail (space == NULL || babl_space_is_cmyk (babl_format_get_space (format)));
gegl_color_get_pixel (self, format, cmyk);
if (c) *c = cmyk[0];
if (m) *m = cmyk[1];
if (y) *y = cmyk[2];
if (k) *k = cmyk[2];
if (a) *a = cmyk[3];
}
static void
gegl_color_set_from_string (GeglColor *self,
const gchar *color_string)
......@@ -588,6 +727,21 @@ gegl_param_color_set_default (GParamSpec *param_spec,
g_value_take_object (value, gegl_color_duplicate (gegl_color->default_color));
}
static gint
gegl_param_color_cmp (GParamSpec *param_spec,
const GValue *value1,
const GValue *value2)
{
GeglColor *color1 = g_value_get_object (value1);
GeglColor *color2 = g_value_get_object (value2);
if (color1->priv->format != color2->priv->format)
return 1;
else
return memcmp (color1->priv->pixel, color2->priv->pixel,
babl_format_get_bytes_per_pixel (color1->priv->format));
}
GType
gegl_param_color_get_type (void)
{
......@@ -603,7 +757,7 @@ gegl_param_color_get_type (void)
gegl_param_color_finalize,
gegl_param_color_set_default,
NULL,
NULL
gegl_param_color_cmp
};
param_color_type_info.value_type = GEGL_TYPE_COLOR;
......
......@@ -116,6 +116,88 @@ void gegl_color_set_rgba (GeglColor *color,
gdouble green,
gdouble blue,
gdouble alpha);
/**
* gegl_color_get_rgba_with_space:
* @color: a #GeglColor
* @red: (out): red return location.
* @green: (out): green return location.
* @blue: (out): blue return location.
* @alpha: (out): alpha return location.
* @space: RGB space.
*
* Retrieves the current set color stored as @space.
* If @space is %NULL, this is equivalent to requesting color in sRGB.
*/
void gegl_color_get_rgba_with_space (GeglColor *color,
gdouble *red,
gdouble *green,
gdouble *blue,
gdouble *alpha,
const Babl *space);
/**
* gegl_color_set_rgba_with_space:
* @color: a #GeglColor
* @red: red value
* @green: green value
* @blue: blue value
* @alpha: alpha value
* @space: RGB space.
*
* Set color as RGBA data stored as @space. If @space is %NULL, this is
* equivalent to storing as sRGB.
*/
void gegl_color_set_rgba_with_space (GeglColor *color,
gdouble red,
gdouble green,
gdouble blue,
gdouble alpha,
const Babl *space);
/**
* gegl_color_get_cmyk:
* @color: a #GeglColor
* @cyan: (out): cyan return location.
* @magenta: (out): magenta return location.
* @yellow: (out): yellow return location.
* @key: (out): key return location.
* @alpha: (out): alpha return location.
* @space: (nullable): CMYK space.
*
* Retrieves the current set color stored as @space.
* If @space is %NULL, this is equivalent to requesting color in the default
* naive CMYK space.
*/
void gegl_color_get_cmyk (GeglColor *color,
gdouble *cyan,
gdouble *magenta,
gdouble *yellow,
gdouble *key,
gdouble *alpha,
const Babl *space);
/**
* gegl_color_set_cmyk:
* @color: a #GeglColor
* @cyan: cyan value
* @magenta: magenta value
* @yellow: yellow value
* @key: key value
* @alpha: alpha value
* @space: (nullable): CMYK space.
*
* Set color as CMYK data stored as @space. If @space is %NULL, this is
* equivalent to storing with the default naive CMYK space.
*/
void gegl_color_set_cmyk (GeglColor *color,
gdouble cyan,
gdouble magenta,
gdouble yellow,
gdouble key,
gdouble alpha,
const Babl *space);
/**
* gegl_color_set_pixel: (skip)
* @color: a #GeglColor
......@@ -127,6 +209,7 @@ void gegl_color_set_rgba (GeglColor *color,
void gegl_color_set_pixel (GeglColor *color,
const Babl *format,
const void *pixel);
/**
* gegl_color_get_pixel: (skip)
* @color: a #GeglColor
......@@ -138,6 +221,27 @@ void gegl_color_set_pixel (GeglColor *color,
void gegl_color_get_pixel (GeglColor *color,
const Babl *format,
void *pixel);
/**
* gegl_color_set_bytes:
* @color: a #GeglColor
* @format: a babl pixel format
* @bytes: color stored as @format
*
* Set a GeglColor from a pixel stored in a %GBytes and it's babl format.
*/
void gegl_color_set_bytes (GeglColor *color,
const Babl *format,
GBytes *bytes);
/**
* gegl_color_get_bytes:
* @color: a #GeglColor
* @format: a babl pixel format
*
* Returns: the color in the given @format.
*/
GBytes * gegl_color_get_bytes (GeglColor *color,
const Babl *format);
/***
*/
......