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

On Thu, Jan 05, 2017 at 02:06:52PM +0100, Øyvind Kolås wrote:
On Thu, Jan 5, 2017 at 2:08 AM, Vincent
<debian-siril free-astro vinvin tf> wrote:
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:

Changing this line:
   gegl_buffer_set(buf, &rect, 0, format, &fit.pdata[0], GEGL_AUTO_ROWSTRIDE);
to be:
   gegl_buffer_set(buf, &rect, 0, format, fit.pdata[0], GEGL_AUTO_ROWSTRIDE);

results in a window displaying an image rather than a seg fault for me.

Happy hacking :)

Sorry everybody for this stupid mistake, I knew it was an easy one...
So I confirm that this fix and the previous one that you mentioned, the
mipmap level that was supposed to be 0 instead of 1, make my sample
work, thanks a lot Øyvind!

At least I think I had correctly understood the graph part. Now I'll
continue my tests in the main application.

Best wishes for 2017.

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