Hi, 

Yes, nexts majors versions of GIMP will use GEGL to process images. I won't 
describe here what are advantages of using GEGL, but only how to get started 
using it instead of the <=2.8 api. 

0) There is no exact matches between the old and the new api, though, generally 
speaking, GEGL makes things simpler and cleaner. 
1) You may have a look at 
http://wiki.gimp.org/index.php/Hacking:Porting_filters_to_GEGL, which contains 
some informations on how to do that. 
2) I strongly encourage you to get in touch with us on IRC, irc.gimp.net 
channel #gimp and #gegl, for any question, or if you need help. 
3) Keep in mind that gegl.org is a bit outdated, so please use the 
documentation available after building sources from the git repository. (using 
--enable-gtk-doc) 
4) Also both GEGL' and GIMP's git trees contain good examples. 

There are basically two ways of porting a plug-in to GEGL : 

1) by creating a "GEGL operation" instead of a GIMP plug-in, you will find a 
lot of examples in the GEGL source tree /operations/common/*.c, depending on 
what your operation does, I can be more specific. 
2) for some plug-ins, using a GEGL operation is currently not possible 
(handling parasites, reodering layers, specific UI, ...), then a gimp plug-in 
is still needed. In that case, gimp_drawable_get_buffer() will provide the 
GeglBuffer containing all pixels of the drawable. 

In both cases, you have then to deal with GeglBuffer's accessors to do what you 
want with pixels. You can use either gegl_buffer_get() to get all pixels needed 
inside a contiguous array, or a GeglBufferIterator, or even a GeglSampler. I 
won't say more for now, these hints are not precises hint on how to go from 
gimp_pixel_rgn_init to something else since it depends on what you want to do. 
If you are more specific (you can show us what plug-in is this about), we will 
probably be more helpful to your specific use case. 

And again, most of things happen on IRC, so feel free to meet us there. 

Kind regards, 

Téo 

----- Mail original -----

De: "Helmut Jarausch" <[email protected]> 
À: "gimp-developer" <[email protected]> 
Envoyé: Mercredi 27 Novembre 2013 18:17:13 
Objet: [Gimp-developer] GIMP_DEPRECATED - recipe for translation? 

Hi, 

I have a plugin which uses lots of functions which are deprecated now. 
Since the macro GIMP_DEPRECATED_FOR suggests functions with totally 
different parameters 
GIMP_DEPRECATED_FOR(gimp_drawable_get_buffer) 
void gimp_pixel_rgn_init (GimpPixelRgn *pr, 
GimpDrawable *drawable, 
gint x, 
gint y, 
gint width, 
gint height, 
gint dirty, 
gint shadow); 

(gimp_drawable_get_buffer has a single drawable_ID parameter only) 

is there a recipe how to translate the old calls into the current 
function calls? 

Many thanks for a hint, 
Helmut. 
_______________________________________________ 
gimp-developer-list mailing list 
List address: [email protected] 
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list 

_______________________________________________
gimp-developer-list mailing list
List address:    [email protected]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list

Reply via email to