How to deal with pixel-per-pixel operations?
This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
How to deal with pixel-per-pixel operations? | Alessandro Francesconi | 11 Jun 10:53 |
How to deal with pixel-per-pixel operations? | Alessandro Francesconi | 11 Jun 12:03 |
How to deal with pixel-per-pixel operations? | Jon Nordby | 11 Jun 13:00 |
How to deal with pixel-per-pixel operations? | Øyvind Kolås | 11 Jun 13:02 |
How to deal with pixel-per-pixel operations? | Michael Natterer | 11 Jun 13:47 |
How to deal with pixel-per-pixel operations? | Alessandro Francesconi | 11 Jun 13:57 |
How to deal with pixel-per-pixel operations?
Thank you so much!
Ale
Da: Øyvind Kolås
Data invio: martedì 11 giugno 2013 12.49
A: Alessandro Francesconi
Cc: gimp-developer-list@gnome.org
On Tue, Jun 11, 2013 at 11:05 AM, Alessandro Francesconi wrote:
Thanks for the answer, I’m not new on GIMP plugin’s development but I’m totally new on GEGL operations!
After a first look, it seems that none of the standard plugins from the GIMP’s procedure database use GEGL for their operations, and the only way to test a operation made with GEGL is to open this dialog: http://docs.gimp.org/it/gimp-tool-gegl.html
.... am I wrong?
I mean, is it possible to define a new plugin using the classical method with ’gimp_install_procedure()’, making it accessible through the PDB and writing a ”complex” user interface with GTK, but using GEGL APIs for the image manipulation phase?
Take a look at goat-exercise.c in gimp/plug-ins/common, it shows how to get and manipulate image drawables as GeglBuffers. For documentation on GEGL see http://gegl.org/ or the docs dir of your own GEGL build.
/Ø
«The future is already here. It's just not very evenly distributed» -- William Gibson http://pippin.gimp.org/ http://ffii.org/
How to deal with pixel-per-pixel operations?
Got problems here...
Following the goat example, I downloaded the libgegl-dev 0.2 package (I'm on Debian) and I've started including the necessary libs in my source code:
----- #include
#include
#include -----
gegl_init() is recognized, but gimp_drawable_get_buffer() and gimp_drawable_get_shadow_buffer() don't. They appears to be defined in the git repository, here: https://git.gnome.org/browse/gimp/tree/libgimp/gimpdrawable.h But looking at the gimp 2.8.4 libs I have in my machine, gimpdrawable.h does not contain those definitions!
Don't tell me... gimp_drawable_get_buffer() and similar are not yet in the set of available APIs for GIMP-dev 2.8.4.... is it right? How can I develop a GEGL plugin for 2.8.4 application in these conditions? .-.
Sincerely, (a bit angry) Ale
From: alessandrofrancesconi@live.it To: pippin@gimp.org
Date: Tue, 11 Jun 2013 10:53:26 +0000 CC: gimp-developer-list@gnome.org
Subject: Re: [Gimp-developer] How to deal with pixel-per-pixel operations?Thank you so much!
Ale
Da: Øyvind Kolås Data invio: martedì 11 giugno 2013 12.49 A: Alessandro Francesconi
Cc: gimp-developer-list@gnome.orgOn Tue, Jun 11, 2013 at 11:05 AM, Alessandro Francesconi wrote:
Thanks for the answer, I’m not new on GIMP plugin’s development but I’m totally new on GEGL operations!
After a first look, it seems that none of the standard plugins from the GIMP’s procedure database use GEGL for their operations, and the only way to test a operation made with GEGL is to open this dialog: http://docs.gimp.org/it/gimp-tool-gegl.html
.... am I wrong?
I mean, is it possible to define a new plugin using the classical method with ’gimp_install_procedure()’, making it accessible through the PDB and writing a ”complex” user interface with GTK, but using GEGL APIs for the image manipulation phase?
Take a look at goat-exercise.c in gimp/plug-ins/common, it shows how to get and manipulate image drawables as GeglBuffers. For documentation on GEGL see http://gegl.org/ or the docs dir of your own GEGL build.
/Ø --
«The future is already here. It's just not very evenly distributed» -- William Gibson http://pippin.gimp.org/ http://ffii.org/ _______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-developer-list
How to deal with pixel-per-pixel operations?
On 11 June 2013 14:03, Alessandro Francesconi
wrote:
Got problems here...
Following the goat example, I downloaded the libgegl-dev 0.2 package (I'm on Debian) and I've started including the necessary libs in my source code:
----- #include
#include
#include -----
gegl_init() is recognized, but gimp_drawable_get_buffer() and gimp_drawable_get_shadow_buffer() don't. They appears to be defined in the git repository, here: https://git.gnome.org/browse/gimp/tree/libgimp/gimpdrawable.h But looking at the gimp 2.8.4 libs I have in my machine, gimpdrawable.h does not contain those definitions!
Don't tell me... gimp_drawable_get_buffer() and similar are not yet in the set of available APIs for GIMP-dev 2.8.4.... is it right? How can I develop a GEGL plugin for 2.8.4 application in these conditions? .-.
I am afraid that is the case. These APIs were introduced after 2.8.x was released, and will be available in GIMP 2.10. The existing (non-GEGL) pixel manipulation APIs will be removed in GIMP 3.0, which will follow after 2.10. I recommend just making sure that the code that manipulates pixels/tiles is clearly separated in the plugin and that they fit OK with the API model that GeglBuffer has, to make porting when 2.10 comes out quick and easy.
Jon Nordby - www.jonnor.com
How to deal with pixel-per-pixel operations?
On Tue, Jun 11, 2013 at 3:00 PM, Jon Nordby wrote:
I am afraid that is the case. These APIs were introduced after 2.8.x was released, and will be available in GIMP 2.10. The existing (non-GEGL) pixel manipulation APIs will be removed in GIMP 3.0, which will follow after 2.10.
I recommend just making sure that the code that manipulates pixels/tiles is clearly separated in the plugin and that they fit OK with the API model that GeglBuffer has, to make porting when 2.10 comes out quick and easy.
Or if the filter is something that could be a GEGL operation, write a GEGL operation since such can be used by both GIMP-2.8 and GIMP-2.10. (Though I don't think there is a way to apply a GEGL op using the PDB; at least in 2.8).
/
The future is already here. It's just not very evenly distributed -- William Gibson http://pippin.gimp.org/ http://ffii.org/
How to deal with pixel-per-pixel operations?
On Tue, 2013-06-11 at 14:03 +0200, Alessandro Francesconi wrote:
Got problems here...
Following the goat example, I downloaded the libgegl-dev 0.2 package (I'm on Debian)
For GIMP git master, you need babl master and gegl master, no tarballs.
--Mitch
and I've started including the necessary libs in my source code:
----- #include
#include
#include -----
gegl_init() is recognized, but gimp_drawable_get_buffer() and gimp_drawable_get_shadow_buffer() don't. They appears to be defined in the git repository, here: https://git.gnome.org/browse/gimp/tree/libgimp/gimpdrawable.h But looking at the gimp 2.8.4 libs I have in my machine, gimpdrawable.h does not contain those definitions!
Don't tell me... gimp_drawable_get_buffer() and similar are not yet in the set of available APIs for GIMP-dev 2.8.4.... is it right? How can I develop a GEGL plugin for 2.8.4 application in these conditions? .-.
Sincerely, (a bit angry) Ale
From: alessandrofrancesconi@live.it To: pippin@gimp.org
Date: Tue, 11 Jun 2013 10:53:26 +0000 CC: gimp-developer-list@gnome.org
Subject: Re: [Gimp-developer] How to deal with pixel-per-pixel operations?Thank you so much!
Ale
Da: Øyvind Kolås Data invio: martedì 11 giugno 2013 12.49 A: Alessandro Francesconi
Cc: gimp-developer-list@gnome.orgOn Tue, Jun 11, 2013 at 11:05 AM, Alessandro Francesconi wrote:
Thanks for the answer, I’m not new on GIMP plugin’s development but I’m totally new on GEGL operations!
After a first look, it seems that none of the standard plugins from the GIMP’s procedure database use GEGL for their operations, and the only way to test a operation made with GEGL is to open this dialog: http://docs.gimp.org/it/gimp-tool-gegl.html
.... am I wrong?
I mean, is it possible to define a new plugin using the classical method with ’gimp_install_procedure()’, making it accessible through the PDB and writing a ”complex” user interface with GTK, but using GEGL APIs for the image manipulation phase?
Take a look at goat-exercise.c in gimp/plug-ins/common, it shows how to get and manipulate image drawables as GeglBuffers. For documentation on GEGL see http://gegl.org/ or the docs dir of your own GEGL build.
/Ø --
«The future is already here. It's just not very evenly distributed» -- William Gibson http://pippin.gimp.org/ http://ffii.org/ _______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-developer-list_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-developer-list
How to deal with pixel-per-pixel operations?
Thank you everyone for the kind response! I've decided to stay with 2.8 APIs, so I won't use GEGL for now.
Going back to the initial question, what's the best example to see how to iterate a 5x5 mask (but size could be variable) for each pixel without losing performance?
In particular, what combination of functions should I use (talking about gimpdrawable, pixelrgn, iterators and so on)?
Thank you again Ale
Subject: Re: [Gimp-developer] How to deal with pixel-per-pixel operations? From: mitch@gimp.org
To: alessandrofrancesconi@live.it
CC: pippin@gimp.org; gimp-developer-list@gnome.org Date: Tue, 11 Jun 2013 15:47:34 +0200On Tue, 2013-06-11 at 14:03 +0200, Alessandro Francesconi wrote:
Got problems here...
Following the goat example, I downloaded the libgegl-dev 0.2 package (I'm on Debian)
For GIMP git master, you need babl master and gegl master, no tarballs.
--Mitch
and I've started including the necessary libs in my source code:
----- #include
#include
#include -----
gegl_init() is recognized, but gimp_drawable_get_buffer() and gimp_drawable_get_shadow_buffer() don't. They appears to be defined in the git repository, here: https://git.gnome.org/browse/gimp/tree/libgimp/gimpdrawable.h But looking at the gimp 2.8.4 libs I have in my machine, gimpdrawable.h does not contain those definitions!
Don't tell me... gimp_drawable_get_buffer() and similar are not yet in the set of available APIs for GIMP-dev 2.8.4.... is it right? How can I develop a GEGL plugin for 2.8.4 application in these conditions? .-.
Sincerely, (a bit angry) Ale
From: alessandrofrancesconi@live.it To: pippin@gimp.org
Date: Tue, 11 Jun 2013 10:53:26 +0000 CC: gimp-developer-list@gnome.org
Subject: Re: [Gimp-developer] How to deal with pixel-per-pixel operations?Thank you so much!
Ale
Da: Øyvind Kolås Data invio: martedì 11 giugno 2013 12.49 A: Alessandro Francesconi
Cc: gimp-developer-list@gnome.orgOn Tue, Jun 11, 2013 at 11:05 AM, Alessandro Francesconi wrote:
Thanks for the answer, I’m not new on GIMP plugin’s development but I’m totally new on GEGL operations!
After a first look, it seems that none of the standard plugins from the GIMP’s procedure database use GEGL for their operations, and the only way to test a operation made with GEGL is to open this dialog: http://docs.gimp.org/it/gimp-tool-gegl.html
.... am I wrong?
I mean, is it possible to define a new plugin using the classical method with ’gimp_install_procedure()’, making it accessible through the PDB and writing a ”complex” user interface with GTK, but using GEGL APIs for the image manipulation phase?
Take a look at goat-exercise.c in gimp/plug-ins/common, it shows how to get and manipulate image drawables as GeglBuffers. For documentation on GEGL see http://gegl.org/ or the docs dir of your own GEGL build.
/Ø --
«The future is already here. It's just not very evenly distributed» -- William Gibson http://pippin.gimp.org/ http://ffii.org/ _______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-developer-list_______________________________________________ gimp-developer-list mailing list
gimp-developer-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-developer-list