Gimp/libgimp/gimpdrawablecolor_pdb.h

124 lines
7 KiB
C
Raw Permalink Normal View History

/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
*
* gimpdrawablecolor_pdb.h
*
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <https://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pdbgen.pl */
#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
#error "Only <libgimp/gimp.h> can be included directly."
#endif
#ifndef __GIMP_DRAWABLE_COLOR_PDB_H__
#define __GIMP_DRAWABLE_COLOR_PDB_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gimp:brightness_contrast)
gboolean gimp_drawable_brightness_contrast (GimpDrawable *drawable,
gdouble brightness,
gdouble contrast);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gimp:color_balance)
gboolean gimp_drawable_color_balance (GimpDrawable *drawable,
GimpTransferMode transfer_mode,
gboolean preserve_lum,
gdouble cyan_red,
gdouble magenta_green,
gdouble yellow_blue);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gimp:colorize)
gboolean gimp_drawable_colorize_hsl (GimpDrawable *drawable,
gdouble hue,
gdouble saturation,
gdouble lightness);
GIMP_DEPRECATED_FOR(gimp:curves)
gboolean gimp_drawable_curves_explicit (GimpDrawable *drawable,
GimpHistogramChannel channel,
gsize num_values,
const gdouble *values);
GIMP_DEPRECATED_FOR(gimp:curves)
gboolean gimp_drawable_curves_spline (GimpDrawable *drawable,
GimpHistogramChannel channel,
gsize num_coordinates,
const gdouble *points);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gegl:component_extract)
gboolean gimp_drawable_extract_component (GimpDrawable *drawable,
gint component,
gboolean invert,
gboolean linear);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gimp:desaturate)
gboolean gimp_drawable_desaturate (GimpDrawable *drawable,
GimpDesaturateMode desaturate_mode);
gboolean gimp_drawable_equalize (GimpDrawable *drawable,
gboolean mask_only);
gboolean gimp_drawable_histogram (GimpDrawable *drawable,
GimpHistogramChannel channel,
gdouble start_range,
gdouble end_range,
gdouble *mean,
gdouble *std_dev,
gdouble *median,
gdouble *pixels,
gdouble *count,
gdouble *percentile);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gimp:hue_saturation)
gboolean gimp_drawable_hue_saturation (GimpDrawable *drawable,
GimpHueRange hue_range,
gdouble hue_offset,
gdouble lightness,
gdouble saturation,
gdouble overlap);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(filters "gegl:invert_linear" or "gegl:invert_gamma")
gboolean gimp_drawable_invert (GimpDrawable *drawable,
gboolean linear);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gimp:levels)
gboolean gimp_drawable_levels (GimpDrawable *drawable,
GimpHistogramChannel channel,
gdouble low_input,
gdouble high_input,
gboolean clamp_input,
gdouble gamma,
gdouble low_output,
gdouble high_output,
gboolean clamp_output);
gboolean gimp_drawable_levels_stretch (GimpDrawable *drawable);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gegl:shadows_highlights)
gboolean gimp_drawable_shadows_highlights (GimpDrawable *drawable,
gdouble shadows,
gdouble highlights,
gdouble whitepoint,
gdouble radius,
gdouble compress,
gdouble shadows_ccorrect,
gdouble highlights_ccorrect);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gimp:posterize)
gboolean gimp_drawable_posterize (GimpDrawable *drawable,
gint levels);
app, libgimp, pdb: deprecate various procedures in favor of filters. I have manually tested each and every of the deprecated functions, making sure we don't lose any feature. As expected, we don't. Having dedicated libgimp functions may feel a tiny bit easier to call but this is not scalable. We can't do this forever, with one function per filter. And fortunately we won't have to, since now we can call filters on any drawable directly! It also comes with the following generic advantages: * It works with any filter, even third-party ones; * We can also append filters non-destructively for later removal or edits (the deprecated functions were always merging the filters); * If the filter evolves, e.g. with new arguments, it should not affect the API (though we should implement GEGL operation versions); * If we don't need to set all arguments (e.g. leaving many args with default value), the filter API may even be simpler and shorter; * The filter API will be much less "opaque" thanks to argument naming (rather than a long list of integers, doubles, etc.). Specifically to the now deprecated functions, I noted the following weaknesses on the deprecated API when testing: * gimp_drawable_colorize_hsl() was missing a "color" argument; * gimp_drawable_extract_component() had the enum argument "component" set as an integer, which is particularly opaque when re-reading existing code. Whereas the filter API uses generate choice strings which are self-explanatory! For instance choice RGB Red is 0 with the deprecated function but "rgb-r" with the filter API. * gimp_drawable_levels() was missing "trc" argument (as noted in #15681). And as expected, no features are lost. Note that I didn't deprecate the curves functions yet, because we need to implement the GimpCurve type in libgimp first. There are a few more functions which I didn't deprecate yet, because they don't use a filter directly, but some core functions, though for some of them, it is very likely they can be efficiently reimplemented with the filter API too. I'll have to look closer at it. It looks like we may have to implement GimpHistogram in libgimp too though.
2026-02-01 13:06:10 -08:00
GIMP_DEPRECATED_FOR(gimp:threshold)
gboolean gimp_drawable_threshold (GimpDrawable *drawable,
GimpHistogramChannel channel,
gdouble low_threshold,
gdouble high_threshold);
G_END_DECLS
#endif /* __GIMP_DRAWABLE_COLOR_PDB_H__ */