In order not to rewrite interpolation fnctionality for every operation I
would like to propose following API.
GeglInterpolator
+- GeglInterpolatorLinear
|
+ GeglInterpolatorCubic
|
+ GeglInterpolatorLanczos
usage :
/* first create the interpolator */
GeglInterpolatorLinear *interpolator = g_object_new
(GEGL_TYPE_INTERPLATOR_LINEAR,
"source", buffer,
"format",
babl_format ("RaGaBaA float"),
NULL);
gegl_interpolator_prepare(interpolator); /* prepares a linear buffer in
the format suitable for the interpolation routine. */
gegl_interpolator_get(interpolator, x, y, dst); /* returns a
interpolated pixel in dst */
x,y = source coördinates type double
dst = interpolate pixel in format specified by "format" property.
Please comment on this, untested code can be found at :
http://users.telenet.be/geert.jordaens/gegl_interpolator
Geert
_______________________________________________
Gegl-developer mailing list
Gegl-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer