Commit 6a6a5188 authored by Øyvind Kolås's avatar Øyvind Kolås

Internal API change, the order of arguments for buffer set/get

has changed to:
void gegl_buffer_get (GeglBuffer    *buffer,
GeglRectangle *rect,
gdouble        scale,
void          *format,
void          *dest);
void gegl_buffer_set (GeglBuffer    *buffer,
GeglRectangle *rect,
void          *format,
void          *src);
* bin/gegl-view.c: (expose_event), (task_monitor):
* bin/export.c: (button_render_clicked), (gegl_buffer_export_png):
* gegl/buffer/gegl-buffer.c: (gegl_buffer_set), (gegl_buffer_get):
* gegl/buffer/gegl-buffer.h:
* gegl/gegl-operation-point-composer.c: (process_inner):
* gegl/gegl-operation-point-filter.c: (process_inner):
* operations/blur/box-blur.c: (hor_blur), (ver_blur):
* operations/blur/gaussian-blur.c: (iir_young_hor_blur),
(iir_young_ver_blur), (fir_hor_blur), (fir_ver_blur):
* operations/color/remap.c: (process):
* operations/color/stretch-contrast.c: (buffer_get_min_max),
(process):
* operations/core/save-buffer.c: (process):
* operations/display/display.c: (process):
* operations/file-io/jpg-load.c: (gegl_buffer_import_jpg):
* operations/file-io/pixbuf.c: (process):
* operations/file-io/png-load.c: (gegl_buffer_import_png):
* operations/file-io/png-save.c: (gegl_buffer_export_png):
* operations/file-io/raw-load.c: (load_buffer):
* operations/file-io/svg-load.c: (gegl_buffer_import_svg):
* operations/render/FractalExplorer.c: (process):
* operations/render/checkerboard.c: (process):
* operations/render/color.c: (process):
* operations/render/noise.c: (process):
* operations/render/text.c: (process):
* operations/transform/interpolate-cubic.c: (affine_cubic):
* operations/transform/interpolate-lanczos.c: (affine_lanczos):
* operations/transform/linear.c: (affine_linear), (scale_linear):
* operations/transform/nearest.c: (affine_nearest),
(scale_nearest):
* operations/workshop/box-max.c: (hor_max), (ver_max):
* operations/workshop/box-min.c: (hor_min), (ver_min):
* operations/workshop/demosaic-simple.c: (demosaic):
* operations/workshop/gtk-display.c: (process):
* operations/workshop/kuwahara-max.c: (kuwahara):
* operations/workshop/kuwahara-min.c: (kuwahara):
* operations/workshop/kuwahara-switch.c: (kuwahara_switch):
* operations/workshop/kuwahara.c: (kuwahara):
* operations/workshop/mandelbrot.c: (process):
* operations/workshop/rawbayer-load.c: (load_buffer):

svn path=/trunk/; revision=1224
parent 674fe610
2007-01-27 Øyvind Kolås <pippin@gimp.org>
Internal API change, the order of arguments for buffer set/get
has changed to:
void gegl_buffer_get (GeglBuffer *buffer,
GeglRectangle *rect,
gdouble scale,
void *format,
void *dest);
void gegl_buffer_set (GeglBuffer *buffer,
GeglRectangle *rect,
void *format,
void *src);
* bin/gegl-view.c: (expose_event), (task_monitor):
* bin/export.c: (button_render_clicked), (gegl_buffer_export_png):
* gegl/buffer/gegl-buffer.c: (gegl_buffer_set), (gegl_buffer_get):
* gegl/buffer/gegl-buffer.h:
* gegl/gegl-operation-point-composer.c: (process_inner):
* gegl/gegl-operation-point-filter.c: (process_inner):
* operations/blur/box-blur.c: (hor_blur), (ver_blur):
* operations/blur/gaussian-blur.c: (iir_young_hor_blur),
(iir_young_ver_blur), (fir_hor_blur), (fir_ver_blur):
* operations/color/remap.c: (process):
* operations/color/stretch-contrast.c: (buffer_get_min_max),
(process):
* operations/core/save-buffer.c: (process):
* operations/display/display.c: (process):
* operations/file-io/jpg-load.c: (gegl_buffer_import_jpg):
* operations/file-io/pixbuf.c: (process):
* operations/file-io/png-load.c: (gegl_buffer_import_png):
* operations/file-io/png-save.c: (gegl_buffer_export_png):
* operations/file-io/raw-load.c: (load_buffer):
* operations/file-io/svg-load.c: (gegl_buffer_import_svg):
* operations/render/FractalExplorer.c: (process):
* operations/render/checkerboard.c: (process):
* operations/render/color.c: (process):
* operations/render/noise.c: (process):
* operations/render/text.c: (process):
* operations/transform/interpolate-cubic.c: (affine_cubic):
* operations/transform/interpolate-lanczos.c: (affine_lanczos):
* operations/transform/linear.c: (affine_linear), (scale_linear):
* operations/transform/nearest.c: (affine_nearest),
(scale_nearest):
* operations/workshop/box-max.c: (hor_max), (ver_max):
* operations/workshop/box-min.c: (hor_min), (ver_min):
* operations/workshop/demosaic-simple.c: (demosaic):
* operations/workshop/gtk-display.c: (process):
* operations/workshop/kuwahara-max.c: (kuwahara):
* operations/workshop/kuwahara-min.c: (kuwahara):
* operations/workshop/kuwahara-switch.c: (kuwahara_switch):
* operations/workshop/kuwahara.c: (kuwahara):
* operations/workshop/mandelbrot.c: (process):
* operations/workshop/rawbayer-load.c: (load_buffer):
2007-01-26 Øyvind Kolås <pippin@gimp.org>
Made the cache used for the projection internal to a node. This
......
......@@ -118,9 +118,7 @@ static void button_render_clicked (GtkButton *button,
cache = gegl_node_get_cache (GEGL_VIEW (editor.drawing_area)->node);
gegl_cache_enqueue (cache, rect);
while (gegl_cache_render (cache));
while (gegl_cache_render (cache, &rect));
gegl_buffer_export_png (GEGL_BUFFER (cache),
&rect, path);
......@@ -324,7 +322,7 @@ gegl_buffer_export_png (GeglBuffer *gegl_buffer,
for (i=0; i< rect->h; i++)
{
GeglRectangle line = {rect->x, rect->y + i, rect->w, 1};
gegl_buffer_get (gegl_buffer, &line, pixels, babl_format (format_string), 1.0);
gegl_buffer_get (gegl_buffer, &line, 1.0, babl_format (format_string), pixels);
png_write_rows (png, &pixels, 1);
}
png_write_end (png, info);
......
......@@ -392,8 +392,15 @@ expose_event (GtkWidget *widget, GdkEventExpose * event)
buf = g_malloc ((roi.w+1) * (roi.h+1) * 3);
/* FIXME: this padding should not be needed, but it avoids some segfaults */
gegl_buffer_get (GEGL_BUFFER (gegl_node_get_cache (view->node)),
&roi, buf, babl_format ("R'G'B' u8"), view->scale);
gegl_node_blit (view->node,
&roi,
view->scale,
babl_format ("R'G'B' u8"),
0, /* rowstride, currently unused */
(gpointer)buf,
GEGL_BLIT_CACHE|GEGL_BLIT_DIRTY);
gdk_draw_rgb_image (widget->window,
widget->style->black_gc,
rectangles[i].x, rectangles[i].y,
......@@ -414,7 +421,7 @@ static gboolean task_monitor (gpointer foo)
GeglCache *cache = gegl_node_get_cache (view->node);
gboolean ret = FALSE;
ret = gegl_cache_render (cache);
ret = gegl_cache_render (cache, NULL);
if (ret==FALSE)
{
......
......@@ -898,8 +898,8 @@ gegl_buffer_iterate (GeglBuffer *buffer,
void
gegl_buffer_set (GeglBuffer *buffer,
GeglRectangle *rect,
void *src,
void *format)
void *format,
void *src)
{
GeglBuffer *sub_buf;
if (format == NULL)
......@@ -1247,7 +1247,12 @@ static void resample_bilinear_u8 (void *dest_buf,
}
#undef DO_COMPONENT
void gegl_buffer_get (GeglBuffer *buffer, GeglRectangle *rect, void *dest_buf, void *format, gdouble scale)
void
gegl_buffer_get (GeglBuffer *buffer,
GeglRectangle *rect,
gdouble scale,
void *format,
void *dest_buf)
{
if (format == NULL)
format = buffer->format;
......
......@@ -68,14 +68,14 @@ gint gegl_buffer_px_size (GeglBuffer *buffer);
void gegl_buffer_get (GeglBuffer *buffer,
GeglRectangle *rect,
void *dest,
gdouble scale,
void *format,
gdouble scale);
void *dest);
void gegl_buffer_set (GeglBuffer *buffer,
GeglRectangle *rect,
void *src,
void *format);
void *format,
void *src);
GeglStorage * gegl_buffer_storage (GeglBuffer *buffer);
GeglRectangle gegl_buffer_get_abyss (GeglBuffer *buffer);
......
......@@ -143,11 +143,11 @@ process_inner (GeglOperation *operation,
if (aux)
aux_buf = g_malloc (4 * sizeof (gfloat) * gegl_buffer_pixels (output));
gegl_buffer_get (input, result, buf, point_composer->format, 1.0);
gegl_buffer_get (input, result, 1.0, point_composer->format, buf);
if (aux)
{
gegl_buffer_get (aux, result, aux_buf, point_composer->aux_format, 1.0);
gegl_buffer_get (aux, result, 1.0, point_composer->aux_format, aux_buf);
}
{
GEGL_OPERATION_POINT_COMPOSER_GET_CLASS (operation)->process (
......@@ -158,7 +158,7 @@ process_inner (GeglOperation *operation,
gegl_buffer_pixels (output));
}
gegl_buffer_set (output, result, buf, point_composer->format);
gegl_buffer_set (output, result, point_composer->format, buf);
g_free (buf);
if (aux)
......
......@@ -68,7 +68,7 @@ process_inner (GeglOperation *operation,
{
buf = g_malloc (4 * sizeof (gfloat) * gegl_buffer_pixels (output));
gegl_buffer_get (input, result, buf, point_filter->format, 1.0);
gegl_buffer_get (input, result, 1.0, point_filter->format, buf);
GEGL_OPERATION_POINT_FILTER_GET_CLASS (operation)->process (
operation,
......@@ -76,7 +76,7 @@ process_inner (GeglOperation *operation,
buf,
gegl_buffer_pixels (output));
gegl_buffer_set (output, result, buf, point_filter->format);
gegl_buffer_set (output, result, point_filter->format, buf);
g_free (buf);
}
......
......@@ -210,7 +210,7 @@ hor_blur (GeglBuffer *src,
src_buf = g_malloc0 (src->width * src->height * 4 * 4);
dst_buf = g_malloc0 (dst->width * dst->height * 4 * 4);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
offset = 0;
for (v=0; v<dst->height; v++)
......@@ -232,7 +232,7 @@ hor_blur (GeglBuffer *src,
dst_buf [offset++] = components[i];
}
gegl_buffer_set (dst, NULL, dst_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf);
g_free (src_buf);
g_free (dst_buf);
}
......@@ -251,7 +251,7 @@ ver_blur (GeglBuffer *src,
src_buf = g_malloc0 (src->width * src->height * 4 * 4);
dst_buf = g_malloc0 (dst->width * dst->height * 4 * 4);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
offset=0;
for (v=0; v<dst->height; v++)
......@@ -273,7 +273,7 @@ ver_blur (GeglBuffer *src,
dst_buf [offset++] = components[c];
}
gegl_buffer_set (dst, NULL, dst_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -290,7 +290,7 @@ iir_young_hor_blur (GeglBuffer *src,
buf = g_malloc0 (src->width * src->height * 4 * 4);
w = g_malloc0 (src->width * 4);
gegl_buffer_get (src, NULL, buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), buf);
w_len = src->width;
for (v=0; v<src->height; v++)
......@@ -307,7 +307,7 @@ iir_young_hor_blur (GeglBuffer *src,
}
}
gegl_buffer_set (dst, NULL, buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), buf);
g_free (buf);
g_free (w);
}
......@@ -327,7 +327,7 @@ iir_young_ver_blur (GeglBuffer *src,
buf = g_malloc0 (src->width * src->height * 4 * 4);
w = g_malloc0 (src->height * 4);
gegl_buffer_get (src, NULL, buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), buf);
w_len = src->height;
......@@ -345,7 +345,7 @@ iir_young_ver_blur (GeglBuffer *src,
}
}
gegl_buffer_set (dst, NULL, buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), buf);
g_free (buf);
g_free (w);
}
......@@ -443,7 +443,7 @@ fir_hor_blur (GeglBuffer *src,
src_buf = g_malloc0 (src->width * src->height * 4 * 4);
dst_buf = g_malloc0 (dst->width * dst->height * 4 * 4);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
offset = 0;
for (v=0; v<dst->height; v++)
......@@ -463,7 +463,7 @@ fir_hor_blur (GeglBuffer *src,
cmatrix);
}
gegl_buffer_set (dst, NULL, dst_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf);
g_free (src_buf);
g_free (dst_buf);
}
......@@ -482,7 +482,7 @@ fir_ver_blur (GeglBuffer *src,
src_buf = g_malloc0 (src->width * src->height * 4 * 4);
dst_buf = g_malloc0 (dst->width * dst->height * 4 * 4);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
offset=0;
for (v=0; v<dst->height; v++)
......@@ -503,7 +503,7 @@ fir_ver_blur (GeglBuffer *src,
}
gegl_buffer_set (dst, NULL, dst_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -179,9 +179,9 @@ process (GeglOperation *operation,
min = g_malloc (pixels * sizeof (gfloat) * 3);
max = g_malloc (pixels * sizeof (gfloat) * 3);
gegl_buffer_get (input, result, buf, babl_format ("RGBA float"), 1.0);
gegl_buffer_get (low, result, min, babl_format ("RGB float"), 1.0);
gegl_buffer_get (high, result, max, babl_format ("RGB float"), 1.0);
gegl_buffer_get (input, result, 1.0, babl_format ("RGBA float"), buf);
gegl_buffer_get (low, result, 1.0, babl_format ("RGB float"), min);
gegl_buffer_get (high, result, 1.0, babl_format ("RGB float"), max);
output = g_object_new (GEGL_TYPE_BUFFER,
"format", babl_format ("RGBA float"),
......@@ -206,7 +206,7 @@ process (GeglOperation *operation,
}
}
gegl_buffer_set (output, result, buf, babl_format ("RGBA float"));
gegl_buffer_set (output, result, babl_format ("RGBA float"), buf);
g_free (buf);
g_free (min);
......
......@@ -60,7 +60,7 @@ buffer_get_min_max (GeglBuffer *buffer,
gfloat *buf = g_malloc0 (sizeof (gfloat) * 4 * buffer->width * buffer->height);
gint i;
gegl_buffer_get (buffer, NULL, buf, babl_format ("RGBA float"), 1.0);
gegl_buffer_get (buffer, NULL, 1.0, babl_format ("RGBA float"), buf);
for (i=0;i<gegl_buffer_pixels (buffer);i++)
{
gint component;
......@@ -127,9 +127,9 @@ process (GeglOperation *operation,
result->w,
chunk};
gegl_buffer_get (input, &line, buf, babl_format ("RGBA float"), 1.0);
gegl_buffer_get (input, &line, 1.0, babl_format ("RGBA float"), buf);
inner_process (min, max, buf, result->w * chunk);
gegl_buffer_set (output, &line, buf, babl_format ("RGBA float"));
gegl_buffer_set (output, &line, babl_format ("RGBA float"), buf);
consumed+=chunk;
}
g_free (buf);
......
......@@ -65,9 +65,9 @@ process (GeglOperation *operation,
temp = g_malloc (gegl_buffer_pixels (input) * gegl_buffer_px_size (input));
format = input->format;
gegl_buffer_get (input, &rect, temp, format, 1.0);
gegl_buffer_get (input, &rect, 1.0, format, temp);
gegl_buffer_set (GEGL_BUFFER (self->buffer), &rect, temp, format);
gegl_buffer_set (GEGL_BUFFER (self->buffer), &rect, format, temp);
g_free (temp);
}
return TRUE;
......
......@@ -145,7 +145,9 @@ process (GeglOperation *operation,
"width", result->w,
"height", result->h,
NULL);
gegl_buffer_get (source, NULL, ((SDL_Surface*)self->screen)->pixels,
gegl_buffer_get (source,
NULL,
1.0,
babl_format_new (babl_model ("R'G'B'A"),
babl_type ("u8"),
babl_component ("B'"),
......@@ -153,7 +155,7 @@ process (GeglOperation *operation,
babl_component ("R'"),
babl_component ("A"),
NULL),
1.0);
((SDL_Surface*)self->screen)->pixels);
g_object_unref (source);
if (!sdl_outwin)
......
......@@ -206,7 +206,7 @@ gegl_buffer_import_jpg (GeglBuffer *gegl_buffer,
GeglRectangle rect = {dest_x, dest_y + row++, cinfo.output_width, 1};
jpeg_read_scanlines (&cinfo, buffer, 1);
gegl_buffer_set (gegl_buffer, &rect, buffer[0], babl_format ("R'G'B' u8"));
gegl_buffer_set (gegl_buffer, &rect, babl_format ("R'G'B' u8"), buffer[0]);
}
jpeg_destroy_decompress (&cinfo);
fclose (infile);
......
......@@ -47,7 +47,7 @@ process (GeglOperation *operation,
"width", gdk_pixbuf_get_width (self->pixbuf),
"height", gdk_pixbuf_get_height (self->pixbuf),
NULL);
gegl_buffer_set (output, NULL, gdk_pixbuf_get_pixels (self->pixbuf), NULL);
gegl_buffer_set (output, NULL, NULL, gdk_pixbuf_get_pixels (self->pixbuf));
gegl_operation_set_data (operation, context_id, "output", G_OBJECT (output));
}
return TRUE;
......
......@@ -321,10 +321,10 @@ gegl_buffer_import_png (GeglBuffer *gegl_buffer,
gegl_rect_set (&rect, 0, i, width, 1);
if (pass != 0)
gegl_buffer_get (gegl_buffer, &rect, pixels, format, 1.0);
gegl_buffer_get (gegl_buffer, &rect, 1.0, format, pixels);
png_read_rows (load_png_ptr, &pixels, NULL, 1);
gegl_buffer_set (gegl_buffer, &rect, pixels, format);
gegl_buffer_set (gegl_buffer, &rect, format, pixels);
}
}
}
......
......@@ -144,7 +144,7 @@ gegl_buffer_export_png (GeglBuffer *gegl_buffer,
for (i=0; i< height; i++)
{
GeglRectangle rect = {src_x, src_y+i, width, 1};
gegl_buffer_get (gegl_buffer, &rect, pixels, babl_format (format_string), 1.0);
gegl_buffer_get (gegl_buffer, &rect, 1.0, babl_format (format_string), pixels);
png_write_rows (png, &pixels, 1);
}
......
......@@ -123,14 +123,15 @@ load_buffer (GeglChantOperation *op_raw_load)
guchar *buf=g_malloc (width * height * 3 * 2);
fread (buf, 1, width * height * 3 * 2, pfp);
gegl_buffer_set (GEGL_BUFFER (op_raw_load->priv),
NULL, buf,
NULL,
babl_format_new (
babl_model ("RGB"),
babl_type ("u16"),
babl_component ("G"),
babl_component ("B"),
babl_component ("R"),
NULL)
NULL),
buf
);
g_free (buf);
}
......
......@@ -184,7 +184,7 @@ instead.
GeglRectangle rect = {dest_x, dest_y, width, height};
pixeldata = gdk_pixbuf_get_pixels (pixbuf);
gegl_buffer_set (gegl_buffer, &rect, pixeldata, babl_format ("R'G'B'A u8"));
gegl_buffer_set (gegl_buffer, &rect, babl_format ("R'G'B'A u8"), pixeldata);
}
rsvg_term();
......
......@@ -423,7 +423,7 @@ process (GeglOperation *operation,
}
}
gegl_buffer_set (output, NULL, buf, babl_format ("R'G'B' u8"));
gegl_buffer_set (output, NULL, babl_format ("R'G'B' u8"), buf);
g_free (buf);
}
gegl_operation_set_data (operation, context_id, "output", G_OBJECT (output));
......
......@@ -93,7 +93,7 @@ process (GeglOperation *operation,
}
}
}
gegl_buffer_set (output, NULL, buf, NULL);
gegl_buffer_set (output, NULL, NULL, buf);
g_free (buf);
}
gegl_operation_set_data (operation, context_id, "output", G_OBJECT (output));
......
......@@ -69,7 +69,7 @@ process (GeglOperation *operation,
dst += 4;
}
}
gegl_buffer_set (output, NULL, buf, NULL);
gegl_buffer_set (output, NULL, NULL, buf);
g_free (buf);
}
gegl_operation_set_data (operation, context_id, "output", G_OBJECT (output));
......
......@@ -79,7 +79,7 @@ process (GeglOperation *operation,
}
}
}
gegl_buffer_set (output, NULL, buf, babl_format ("Y float"));
gegl_buffer_set (output, NULL, babl_format ("Y float"), buf);
g_free (buf);
}
gegl_operation_set_data (operation, context_id, "output", G_OBJECT (output));
......
......@@ -167,13 +167,16 @@ process (GeglOperation *operation,
cairo_translate (cr, -need->x, -need->y);
text_layout_text (self, cr, 0, NULL, NULL);
gegl_buffer_set (output, NULL, data, babl_format_new (babl_model ("R'aG'aB'aA"),
babl_type ("u8"),
babl_component ("B'a"),
babl_component ("G'a"),
babl_component ("R'a"),
babl_component ("A"),
NULL));
gegl_buffer_set (output,
NULL,
babl_format_new (babl_model ("R'aG'aB'aA"),
babl_type ("u8"),
babl_component ("B'a"),
babl_component ("G'a"),
babl_component ("R'a"),
babl_component ("A"),
NULL),
data);
cairo_destroy (cr);
cairo_surface_destroy (surface);
......
......@@ -89,7 +89,7 @@ affine_cubic (GeglBuffer *dest,
src_buf = g_new (gfloat, gegl_buffer_pixels (src) << 2);
dest_buf = g_new (gfloat, gegl_buffer_pixels (dest) << 2);
g_assert (src_buf && dest_buf);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
matrix3_copy (inverse, matrix);
matrix3_invert (inverse);
......@@ -168,7 +168,7 @@ affine_cubic (GeglBuffer *dest,
fu = du;
fv = dv;
}
gegl_buffer_set (dest, NULL, dest_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dest, NULL, babl_format ("RaGaBaA float"), dest_buf);
g_free (src_buf);
g_free (dest_buf);
......
......@@ -118,7 +118,7 @@ affine_lanczos (GeglBuffer *dest,
src_buf = g_new (gfloat, gegl_buffer_pixels (src) << 2);
dest_buf = g_new (gfloat, gegl_buffer_pixels (dest) << 2);
g_assert (src_buf && dest_buf);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
matrix3_copy (inverse, matrix);
matrix3_invert (inverse);
......@@ -210,7 +210,7 @@ affine_lanczos (GeglBuffer *dest,
fu = du;
fv = dv;
}
gegl_buffer_set (dest, NULL, dest_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dest, NULL, babl_format ("RaGaBaA float"), dest_buf);
g_free (lanczos);
g_free (src_buf);
......
......@@ -52,7 +52,7 @@ affine_linear (GeglBuffer *dest,
src_buf = g_new (gfloat, gegl_buffer_pixels (src) * 4);
dest_buf = g_new (gfloat, gegl_buffer_pixels (dest) * 4);
g_assert (src_buf && dest_buf);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
/* expand borders */
/* bottom row */
......@@ -194,7 +194,7 @@ affine_linear (GeglBuffer *dest,
v_start += inverse [1][1];
}
gegl_buffer_set (dest, NULL, dest_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dest, NULL, babl_format ("RaGaBaA float"), dest_buf);
g_free (src_buf);
g_free (dest_buf);
......@@ -237,7 +237,7 @@ scale_linear (GeglBuffer *dest,
src_buf = g_new (gfloat, gegl_buffer_pixels (src) * 4);
dest_buf = g_new (gfloat, gegl_buffer_pixels (dest) * 4);
g_assert (src_buf && dest_buf);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
/* expand borders */
/* bottom row */
......@@ -566,7 +566,7 @@ scale_linear (GeglBuffer *dest,
dest_ptr += skip_left + skip_right;
}
gegl_buffer_set (dest, NULL, dest_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dest, NULL, babl_format ("RaGaBaA float"), dest_buf);
g_free (src_buf);
g_free (dest_buf);
......
......@@ -46,7 +46,7 @@ affine_nearest (GeglBuffer *dest,
src_buf = g_new (gfloat, gegl_buffer_pixels (src) * 4);
dest_buf = g_new (gfloat, gegl_buffer_pixels (dest) * 4);
g_assert (src_buf && dest_buf);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
matrix3_copy (inverse, matrix);
matrix3_invert (inverse);
......@@ -100,7 +100,7 @@ affine_nearest (GeglBuffer *dest,
v_start += inverse [1][1];
}
gegl_buffer_set (dest, NULL, dest_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dest, NULL, babl_format ("RaGaBaA float"), dest_buf);
g_free (src_buf);
g_free (dest_buf);
......@@ -134,7 +134,7 @@ scale_nearest (GeglBuffer *dest,
src_buf = g_new (gfloat, gegl_buffer_pixels (src) * 4);
dest_buf = g_new (gfloat, gegl_buffer_pixels (dest) * 4);
g_assert (src_buf && dest_buf);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RaGaBaA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RaGaBaA float"), src_buf);
matrix3_copy (inverse, matrix);
matrix3_invert (inverse);
......@@ -208,7 +208,7 @@ scale_nearest (GeglBuffer *dest,
dest_ptr += dest_rowstride;
}
gegl_buffer_set (dest, NULL, dest_buf, babl_format ("RaGaBaA float"));
gegl_buffer_set (dest, NULL, babl_format ("RaGaBaA float"), dest_buf);
g_free (src_buf);
g_free (dest_buf);
......
......@@ -168,7 +168,7 @@ hor_max (GeglBuffer *src,
src_buf = g_malloc0 (src->width * src->height * 4 * 4);
dst_buf = g_malloc0 (dst->width * dst->height * 4 * 4);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RGBA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RGBA float"), src_buf);
offset = 0;
for (v=0; v<dst->height; v++)
......@@ -187,7 +187,7 @@ hor_max (GeglBuffer *src,
i);
}
gegl_buffer_set (dst, NULL, dst_buf, babl_format ("RGBA float"));
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
g_free (src_buf);
g_free (dst_buf);
}
......@@ -206,7 +206,7 @@ ver_max (GeglBuffer *src,
src_buf = g_malloc0 (src->width * src->height * 4 * 4);
dst_buf = g_malloc0 (dst->width * dst->height * 4 * 4);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RGBA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RGBA float"), src_buf);
offset=0;
for (v=0; v<dst->height; v++)
......@@ -226,7 +226,7 @@ ver_max (GeglBuffer *src,
c);
}
gegl_buffer_set (dst, NULL, dst_buf, babl_format ("RGBA float"));
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -168,7 +168,7 @@ hor_min (GeglBuffer *src,
src_buf = g_malloc0 (src->width * src->height * 4 * 4);
dst_buf = g_malloc0 (dst->width * dst->height * 4 * 4);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RGBA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RGBA float"), src_buf);
offset = 0;
for (v=0; v<dst->height; v++)
......@@ -187,7 +187,7 @@ hor_min (GeglBuffer *src,
i);
}
gegl_buffer_set (dst, NULL, dst_buf, babl_format ("RGBA float"));
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
g_free (src_buf);
g_free (dst_buf);
}
......@@ -206,7 +206,7 @@ ver_min (GeglBuffer *src,
src_buf = g_malloc0 (src->width * src->height * 4 * 4);
dst_buf = g_malloc0 (dst->width * dst->height * 4 * 4);
gegl_buffer_get (src, NULL, src_buf, babl_format ("RGBA float"), 1.0);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RGBA float"), src_buf);
offset=0;
for (v=0; v<dst->height; v++)
......@@ -226,7 +226,7 @@ ver_min (GeglBuffer *src,
c);
}
gegl_buffer_set (dst, NULL, dst_buf, babl_format ("RGBA float"));
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
g_free (src_buf);