Re: [Gegl-developer] basic concepts and usage of gegl in gtk

On Thu, Dec 29, 2016 at 01:17:48AM +0100, Øyvind Kolås wrote:
On Wed, Dec 28, 2016 at 11:34 PM, Vincent
<debian-siril free-astro vinvin tf> wrote:
    gegl_buffer_set(buf, &_rect, 1, format, image_buffer, GEGL_AUTO_ROWSTRIDE);

The problem is that all I get from this code is segfaults. What did I
miss? Isn't gegl-gtk supposed to display the image data given by the
output port of a node? Is something required to transform the gegl
buffer data to a format that the gegl-gtk widget can understand?

Without a downloadable buildable code example it is hard to diagnose
what is going wrong, based on reading the provided source there is at
least one other thing going wrong. You should be providing 0 as the
mipmap level/third argument of gegl_buffer_set, if writing directly to
mipmap level 1, display at scales <50% zoom will only read empty
pixels. The side effect of this would be nothing displayed though; not


Thank you both for your answers. I finally made a sample application
that reads a FITS file and tries to display the first channel's grey
buffer in a gegl-gtk object.

The code is here:
you may also checkout trunk/deps/gegl-gtk. Compilation
instructions are given at the top of the file, dependencies are GTK3,
GEGL, gegl-gtk and cfitsio.
A sample file is available here:

Stack trace for SIGSEV (sorry I don't have all symbols it has too
many dependencies to rebuild shortly):
#0  0x00007ffff43a6e1e in __memmove_sse2_unaligned_erms () at
#1  0x00007ffff617b1a1 in gegl_buffer_set () at
#2  0x000000000040354a in main (argc=2, argv=0x7fffffffe9b8) at

Any ideas?

Is there actually a copy of the buffer into GEGL's memory in this
function? I would have hoped we could avoid that, to have better

Thank you

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]