Fix save-buffer eating memory
Hi,
After an entire day hunting the bug, i provide a tiny fix to save-buffer
op that prevent it to eat all memory (due to default value in
GeglCache).
In the future, i may implement the tile by tile memcpy instead of all in
once as it is now. Attached the patch, with a ChangeLog entry ;).
Basically, the fix is just a modification on how to get input buffer
width, height, x and y. I just copyied the code from png-save which use
gegl_operation_result_rect() instead of using fake input buffer values.
I guess that the true fix would be to directly set input buffer
width,height,x and y to gegl_operation_result_rect() upstream regarding
to process().
This is my first patch to Gegl itself, not its build system :). I wish
i'll be able to contribute more and more in the future but, as you can
see, i prefer need public API in order to debug/improve Gegl because i'm
primarily Gnome Scan developer and this is by using Gegl in Gnome Scan i
will be able to find, hunt and fix bugs like this or add features like
dynamic per instance properties for GeglOperation.
Kind regards,
Étienne.