RSS/Atom feed Twitter
Site is read-only, email is disabled

Porting GIMP plugins to GEGL 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.

9 of 9 messages available
Toggle history

Please log in to manage your subscriptions.

Porting GIMP plugins to GEGL operations Andreas Plath 02 Mar 19:03
  Porting GIMP plugins to GEGL operations Tobias Jakobs 02 Mar 20:04
  Porting GIMP plugins to GEGL operations Alexandre Prokoudine 02 Mar 20:39
   Porting GIMP plugins to GEGL operations Andreas Plath 03 Mar 13:31
    Porting GIMP plugins to GEGL operations Andreas Plath 03 Mar 14:46
     Porting GIMP plugins to GEGL operations Martin Nordholts 03 Mar 19:01
  Porting GIMP plugins to GEGL operations Carol Spears 03 Mar 00:45
  Porting GIMP plugins to GEGL operations Bill Skaggs 03 Mar 06:21
   Porting GIMP plugins to GEGL operations Martin Nordholts 03 Mar 06:35
Andreas Plath
2011-03-02 19:03:42 UTC (over 13 years ago)

Porting GIMP plugins to GEGL operations

Hello all,

Porting GIMP plugins to GEGL operations

There are many many GIMP plugins that would need eventually to be converted to GEGL operations, if we want to use them in future versions of GIMP.

Though I'm not a student, I've been meaning to give something back to the Gimp Project for sometime now. The idea above strikes me as a good place to start, though I might be wrong ... am I? :-) If not, I'd need a few pointers to get going:

1) Looking in the GIMP and GEGL dev sites, I found a list of library dependencies for GEGL but not one for GIMP. I haven't downloaded the source yet, so perhaps there's such a list in there. If not, where can I find it? My computer runs a vanilla Ubuntu 10.04 install, should I expect any problems?

2) Are there any special guidelines for writing plugins using GEGL operations? Are they listed anywhere? (Looking at the GIMP dev site I haven't found any). Is there an already ported plugin to use as an example? Or a template?

3) Which plugins should be ported first? Is there a priority list? Is it possible to port all plugins given the current list of GEGL operations? If not, which are possible?

4) Is this a simple porting job or are there any documented desired improvements to be made on the plugins?

5) Where should I go for help when I need it? :-)

Though I've worked as a C programmer for several years, I'm a bit rusty after six years of spreadsheets and Gantt charts ... :-) On top of that, I've never done any serious graphics programming (except for a couple of classes back in college, over 15 years ago). So I'll need some time to get up to speed. Hope that's alright.

I usually learn faster by working on something concrete, so I'd apreciate if someone could point me to a couple of relevant but not too dificult plugins to start on.

Thanks for any help!

Andreas Plath

Tobias Jakobs
2011-03-02 20:04:55 UTC (over 13 years ago)

Porting GIMP plugins to GEGL operations

On Wed, Mar 2, 2011 at 20:03, Andreas Plath wrote:

Though I'm not a student, I've been meaning to give something back to the Gimp Project for sometime now. The idea above strikes me as a good place to start, though I might be wrong ... am I? :-) If not, I'd need a few pointers to get going:

Nice to see more interested developers. I'm not a developer, but I try to anser your questions as good as possible. Here are some useful informations for Gimp beginner: http://gimp-wiki.who.ee/index.php/Users:Beginner_Developer%27s_FAQ

1) Looking in the GIMP and GEGL dev sites, I found a list of library dependencies for GEGL but not one for GIMP. I haven't downloaded the source yet, so perhaps there's such a list in there. If not, where can I find it? My computer runs a vanilla Ubuntu 10.04 install, should I expect any problems?

You should get all needed libs with "apt-get build-dep gimp". I'm not sure if 10.04 is recent enough because I'm using 10.10.

2) Are there any special guidelines for writing plugins using GEGL operations? Are they listed anywhere? (Looking at the GIMP dev site I haven't found any). Is there an already ported plugin to use as an example? Or a template?

3) Which plugins should be ported first? Is there a priority list? Is it possible to port all plugins given the current list of GEGL operations? If not, which are possible?

4) Is this a simple porting job or are there any documented desired improvements to be made on the plugins?

This should be a good starting page for you: http://gegl.org/contribute.html

5) Where should I go for help when I need it? :-)

Go into the IRC channel to get direct feedback from the developers. Or use the GEGL or Gimp mailing lists, but that is slower.

Regards, Tobias

Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Alexandre Prokoudine
2011-03-02 20:39:35 UTC (over 13 years ago)

Porting GIMP plugins to GEGL operations

On 3/2/11, Andreas Plath wrote:

1) Looking in the GIMP and GEGL dev sites, I found a list of library dependencies for GEGL but not one for GIMP. I haven't downloaded the source yet, so perhaps there's such a list in there. If not, where can I find it? My computer runs a vanilla Ubuntu 10.04 install, should I expect any problems?

'sudo apt-get build-dep gimp' will get you all dependencies except gtk-doc-tools package

2) Are there any special guidelines for writing plugins using GEGL operations? Are they listed anywhere? (Looking at the GIMP dev site I haven't found any). Is there an already ported plugin to use as an example? Or a template?

http://git.gnome.org/browse/gegl/tree/operations/common/motion-blur.c http://git.gnome.org/browse/gegl/tree/operations/common/pixelise.c

Not verbatim, but close to original ports:

http://git.gnome.org/browse/gegl/tree/operations/common/mirrors.c http://git.gnome.org/browse/gegl/tree/operations/common/grid.c

Also note that some filters should become meta-operations which means an operation that simply reuses other operations as building blocks. A good example of one is unsharp mask:

http://git.gnome.org/browse/gegl/tree/operations/common/unsharp-mask.c

3) Which plugins should be ported first? Is there a priority list? Is it possible to port all plugins given the current list of GEGL operations? If not, which are possible?

There are no priorities set. You will find it most encouraging porting filters you care about most :)

5) Where should I go for help when I need it? :-)

On IRC: #gegl at irc.gimp.net

Alexandre Prokoudine http://libregraphicsworld.org

Carol Spears
2011-03-03 00:45:54 UTC (over 13 years ago)

Porting GIMP plugins to GEGL operations

On Wed, Mar 02, 2011 at 04:03:42PM -0300, Andreas Plath wrote:

Hello all,

Porting GIMP plugins to GEGL operations

There are many many GIMP plugins that would need eventually to be converted to GEGL operations, if we want to use them in future versions of GIMP.

1) Looking in the GIMP and GEGL dev sites, I found a list of library dependencies for GEGL but not one for GIMP. I haven't downloaded the source yet, so perhaps there's such a list in there. If not, where can I find it? My computer runs a vanilla Ubuntu 10.04 install, should I expect any problems?

after opening the downloaded archive, type "./configure" and see if this runs successfully and then look at the nicely formated output to see if you need to have other things installed.

when configure fails to run, it always tells exactly what it needs to complete its task and you can decide if you want your distribution to install that for you or if you would like to build that for yourself.

2) Are there any special guidelines for writing plugins using GEGL operations? Are they listed anywhere? (Looking at the GIMP dev site I haven't found any). Is there an already ported plugin to use as an example? Or a template?

look at the gegl ops. and there is a template available, although, i have not heard of any one other than me mentioning this in a long while -- so consider making your own template. perhaps use a mindset like that you are on new ground and that you would like your contribution to be looked back on with respect. that is just a suggestion, but i think that you are on relatively new ground and it is the safest approach, perhaps.

3) Which plugins should be ported first? Is there a priority list? Is it possible to port all plugins given the current list of GEGL operations? If not, which are possible?

a priority list will be made of the priorities of the people who write that list. that seems like a very stupid thing to write, but a bunch of photo- graphers would think that the "useful to photographers" plugins will make those the greatest priority, for example.

the first plugin i tried to use with gimp-3 was pagecurl; is that my priority? it is only the first plugin i tried to use and i tried to use it because of a few qualities it had. some additional gtk+ stuff and oh, the length of time it has been with gimp. it was a priority to me at that moment and because i was trying a new major version for the first time and had become familar with its history.

i strongly recommend that you choose your plugin based on your abilities and not on the recommendation of whatever people are making lists right now -- including me. you should like it and you should know what the results are supposed to be.

i recommend avoiding blurs and noise, i make this suggestion having read the blurred and noisy history of these plugins and if pressed to provide further explanation for this, i would not be able to provide any so ignore this advice if it suits you to do so.

4) Is this a simple porting job or are there any documented desired improvements to be made on the plugins?

is this question redundant?

5) Where should I go for help when I need it? :-)

where ever you actually get answers to your questions.

Though I've worked as a C programmer for several years, I'm a bit rusty after six years of spreadsheets and Gantt charts ... :-) On top of that, I've never done any serious graphics programming (except for a couple of classes back in college, over 15 years ago). So I'll need some time to get up to speed. Hope that's alright.

does this work include any familiarity with gnu build tools? does your C experience require more than just gcc to produce the software that you write? i suspect that this question is worded wrongly. when gimp was being written, the developers then did not even allow c++ comments. but the auto- matic installing of software from the distributions has somewhat diluted this like-minded goal that used to exist. at least i think it is the automatic installing of distribution binaries which did this; consider that to be a theory.

for Linux, when a whole group of software (perhaps even up to ten or more dependencies for the more complex softwares like music players/editors, and graphics displayers/editors) when there is just one dependency that requires that another compiler be installed -- it feels like a purpose has been defeated. gimp-1.2 only had a wrong requirement for g++ in its build scripts and that was removed for gimp-2.0.

I usually learn faster by working on something concrete, so I'd apreciate if someone could point me to a couple of relevant but not too dificult plugins to start on.

the "concrete" is in your mind. pick something that you will enjoy. if it turns out to be not concrete, then you have learned.

my math teacher once told me about the calculus classes (my college split them into 3 semesters). she said that the content of the last class wasn't actually learned until the next one. she said it much more eloquantly than that. but what her words said that it was actually in Calculus 1 that algebra and trig were understood and it was in the second Calculus that the content of the first semester was understood. and that it was in differential equations that the content of the second semester of calculus was understood.

i think that this was an accurate assessment of learning the subject matter of these classes and it is also an accurate assessment of learning just about anything.

carol

Bill Skaggs
2011-03-03 06:21:58 UTC (over 13 years ago)

Porting GIMP plugins to GEGL operations

Let me start by noting that although I was once pretty familiar with the Gimp code, I haven't
looked at it in a couple of years. That being said, this discussion is not making sense to
me. Plug-ins do not access Gimp core functionality directly, they use an interface library
known as "libgimp". When a plug-in uses libgimp, it sends messages to the core telling the
core to execute specified commands. To the best of my knowledge, libgimp does not yet
contain an api that would allow plug-ins to directly invoke Gegl operations. What this all
means, unless I have missed something, is that there are basically three ways to make
plug-ins use Gegl:

(1) Reimplement the core functions that libgimp invokes so that they use Gegl operations.

(2) Reimplement libgimp so that it invokes Gegl operations.

(3) Add a Gegl api to libgimp and rewrite plug-ins so that they use the Gegl api.

These are very different approaches from a coding point of view. Approach 1 requires no
changes in libgimp or in plug-ins. Approach 2 requires changes in libgimp but not in
plug-ins. Only approach 3 requires that plug-ins be rewritten, and before that can be
done it requires adding the needed api. I frankly find it hard to believe that approach 3
is the correct way to handle this, but one way or another, it ought to be clarified.

-- Bill

Martin Nordholts
2011-03-03 06:35:02 UTC (over 13 years ago)

Porting GIMP plugins to GEGL operations

On 03/03/2011 07:21 AM, Bill Skaggs wrote:

Let me start by noting that although I was once pretty familiar with the Gimp code, I haven't
looked at it in a couple of years. That being said, this discussion is not making sense to
me. Plug-ins do not access Gimp core functionality directly, they use an interface library
known as "libgimp".

Hi Bill

You got it all wrong: porting GIMP plug-ins to GEGL operations is about exactly that: replacing GIMP plug-ins with GEGL operations. It is not about making libgimp GEGL-aware.

Instead of http://git.gnome.org/browse/gimp/tree/plug-ins/common/pixelize.c we want
http://git.gnome.org/browse/gegl/tree/operations/common/pixelise.c

Best regards, Martin

Andreas Plath
2011-03-03 13:31:05 UTC (over 13 years ago)

Porting GIMP plugins to GEGL operations

Thanks a lot to all who answered, it helped a lot.

Now I have some setting up and reading to do ... :-)

Thanks again!

Andreas

Andreas Plath
2011-03-03 14:46:44 UTC (over 13 years ago)

Porting GIMP plugins to GEGL operations

Actually, I do have another question.

Looking through the implemented GEGL operations, I've noticed that several plugins that are part of the default GIMP install are already there.

I started to compile a list of which were implemented, but I think I'd better ask: are all the plugins in the default GIMP bundle already implemented as GEGL operations? If not, is there an easy way to find which are already done?

Thanks,

Andreas

2011/3/3 Andreas Plath

Thanks a lot to all who answered, it helped a lot.

Now I have some setting up and reading to do ... :-)

Thanks again!

Andreas

Martin Nordholts
2011-03-03 19:01:02 UTC (over 13 years ago)

Porting GIMP plugins to GEGL operations

On 03/03/2011 03:46 PM, Andreas Plath wrote:

I started to compile a list of which were implemented, but I think I'd better ask: are all the plugins in the default GIMP bundle already implemented as GEGL operations? If not, is there an easy way to find which are already done?

There is no such list yet, it would be great if you could create one which we can put up on our wiki.

The only way to find out if a plug-in has a GEGL operation version is to look for that GEGL operation in the GIMP and GEGL source trees.

/ Martin