Commit 6cdf63cc authored by Michael Natterer's avatar Michael Natterer 😴

app: add gimp_interpolation_to_gegl_filter()

parent 9ebc3b11
......@@ -152,3 +152,19 @@ gimp_layer_mode_to_gegl_operation (GimpLayerModeEffects mode)
return "gegl:over";
}
const gchar *
gimp_interpolation_to_gegl_filter (GimpInterpolationType interpolation)
{
switch (interpolation)
{
case GIMP_INTERPOLATION_NONE: return "nearest";
case GIMP_INTERPOLATION_LINEAR: return "linear";
case GIMP_INTERPOLATION_CUBIC: return "cubic";
case GIMP_INTERPOLATION_LANCZOS: return "lanczos";
default:
break;
}
return "nearest";
}
......@@ -22,12 +22,13 @@
#define __GIMP_GEGL_UTILS_H__
const Babl * gimp_bpp_to_babl_format (guint bpp,
gboolean linear) G_GNUC_CONST;
const Babl * gimp_bpp_to_babl_format (guint bpp,
gboolean linear) G_GNUC_CONST;
TileManager * gimp_buffer_to_tiles (GeglBuffer *buffer);
TileManager * gimp_buffer_to_tiles (GeglBuffer *buffer);
const gchar * gimp_layer_mode_to_gegl_operation (GimpLayerModeEffects mode) G_GNUC_CONST;
const gchar * gimp_layer_mode_to_gegl_operation (GimpLayerModeEffects mode) G_GNUC_CONST;
const gchar * gimp_interpolation_to_gegl_filter (GimpInterpolationType interpolation) G_GNUC_CONST;
#endif /* __GIMP_GEGL_UTILS_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment