It is currently Wed Jul 17, 2024 10:26 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: Best Place to discuss Gimp Script-Fu
PostPosted: Sat Jul 14, 2012 8:10 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jul 14, 2012
Posts: 20
GIMP Version: 2.8
Operating System: Windows
OS Version: 7
GIMP Experience: Basic Level



I've begun writing scripts for Gimp and I'm wondering if there is a site where people gather and help each other out. I've been looking around some forums (like this one) but there doesn't seem to be a lot of activity in the scripts area.

Thanks for any suggestions.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Sat Jul 14, 2012 10:44 pm  (#2) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Phoenix999 wrote:
Best Place to discuss Gimp Script-Fu

In my opinion, you're here. :mrgreen:

I can't remember any scripting questions going unanswered on this site. We have a dedicated scripting forum where scripts are posted, scripting questions answered and various coding techniques discussed.

Please feel free to post and I'm sure you'll get your questions answered right here at GIMP chat. :bigthup

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Sat Jul 14, 2012 11:39 pm  (#3) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
Quote:
In my opinion, you're here

Good to hear - I'll be heading over to the scripting forum soon :) Just reading up on Python, looks like an amazing script language.


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Sun Jul 15, 2012 6:45 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Mar 23, 2012
Posts: 7316
Location: Göteborg at last!
I found nearly all my scripts through links here at GC.


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Sun Jul 15, 2012 11:12 am  (#5) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4757
step7 wrote:
Quote:
In my opinion, you're here

Good to hear - I'll be heading over to the scripting forum soon :) Just reading up on Python, looks like an amazing script language.
If you use Python SaulGoode won't help, but I will :)

_________________
Image


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Mon Jul 16, 2012 10:27 am  (#6) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
ofnuts wrote:
If you use Python SaulGoode won't help, but I will :)
Au contraire. The fact that I am cognizant of the many problems endemic to Python* often enhances my aptitude in providing assistance to those poor lost souls who pursue the endeavor of writing plug-ins in that language. :geek


* That is not to say that Script-fu does not have its problems, however, the nature of Script-fu's limitations I personally find eminently more resolvable.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Mon Jul 16, 2012 12:27 pm  (#7) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
Just starting out in scripting for Gimp, decided to head down the Python path. Can you enlighten me as to what horrors await? It's still not too late to turn back ;) Maybe a list of pros and cons for each in the context of scripting for Gimp? Advocates of other languages feel free to join in too ;)

Serious question, anyone know what the future plans for scripting language support in Gimp are? Looking for citations rather than opinions please.


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Mon Jul 16, 2012 12:46 pm  (#8) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
My advice, for what it's worth, is to not get too caught up in arguments over which languages are the best. A programming language is a tool and a smart coder picks the right tool for the job at hand. I think you'll find merit in most popular programming languages. Otherwise, they never would have gained popularity.

If you want to write scripts and plug-ins for GIMP, learn both scheme and python, then pick the right tool for the task you have in mind.

More advanced "core" plug-ins are often written in C++. Unlike scheme and python scripts, which are executed interpretively, these plug-ins are compiled binaries, linked to GIMP's core libs, such as G'MIC, GAP and Mathmap.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Mon Jul 16, 2012 1:54 pm  (#9) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4757
saulgoode wrote:
Au contraire. The fact that I am cognizant of the many problems endemic to Python*
Must be another species or another biotope :)

_________________
Image


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Mon Jul 16, 2012 1:54 pm  (#10) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
I'd figured I'd have to learn both as most of the script codebase is ScriptFu oriented but Python code just looks so much more inviting. To be fair I haven't spent much time looking at Scheme code so maybe I just haven't adjusted to a Lispy syntax yet.

To steer clear of an esoteric argument over which is better I'll rephrase my question and ask what are the pros and cons of Scheme/Python for particular tasks as you've suggested Gnu.

So which is the right tool for each of these example tasks?
1. Automation of a mundane operation* to be repeated hundreds (or thousands) of times.
(*Say copy a selection, rotate it, scale it down and merge the copy back into the containing layer)
2. Iterate a mathematical function (most likely recursively) at pixel level to process/render an image.
3. Render an image by parsing an XML file containing assembly details of the nature "put an instance of an object with these attributes (colour, scale, rotation..) at this x/y position" for several hundred objects.
4. Batch each of the operations in the above tasks to apply them to a series of image files.

In all cases speed would be of some importance but not to the degree where it matters if a script takes 8 minutes or 10 to complete. 8 minutes vs an hour would.
The focus of writing the scripts would be to get the job done with minimal development.
I'm looking to script to get things done not winning programming awards, although the resulting code would have to be reasonably readable and maintainable (possibly by others) if revisited at a later date.

Your opinions appreciated.


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Mon Jul 16, 2012 3:01 pm  (#11) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
There are all my own opinion...

1. Automation of a mundane operation* to be repeated hundreds (or thousands) of times.
(*Say copy a selection, rotate it, scale it down and merge the copy back into the containing layer)

If you are using calls to the gimp pdb, whether you make them through python, scheme, or C doesn't have a huge difference on performance. For scheme and python you would want to perform the operations on duplicate/new images that have no display, and have their undo disabled for speed.


2. Iterate a mathematical function (most likely recursively) at pixel level to process/render an image.

Definitely C. Pixel based operations are very slow in scheme and only slightly less slow in python, though python does support pixbuff access, shich should be faster than getpixel/setpixel operations.


3. Render an image by parsing an XML file containing assembly details of the nature "put an instance of an object with these attributes (colour, scale, rotation..) at this x/y position" for several hundred objects.

I'd go with Python, for reasons in (1), and python has a good XML parsing library that can be included, and fileIO that is easier to use than scheme's

4. Batch each of the operations in the above tasks to apply them to a series of image files

Scheme or Python will work equally well for this

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Mon Jul 16, 2012 3:13 pm  (#12) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
I'd echo the comments that here is the best place to get help.

The one thing to consider when choosing Script-Fu vs. Python is, who is your customer for the scripts? The important advantage that Script-Fu has over Python is that every installation of GIMP is guaranteed to have Script-Fu, whereas Python support is not guaranteed.

Kevin


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Mon Jul 16, 2012 5:05 pm  (#13) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4757
paynekj wrote:
I'd echo the comments that here is the best place to get help.

The one thing to consider when choosing Script-Fu vs. Python is, who is your customer for the scripts? The important advantage that Script-Fu has over Python is that every installation of GIMP is guaranteed to have Script-Fu, whereas Python support is not guaranteed.

Kevin

No longer true... 2.8 Windows installers come with Python now.

_________________
Image


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Tue Jul 17, 2012 4:46 am  (#14) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
ofnuts wrote:
paynekj wrote:
I'd echo the comments that here is the best place to get help.

The one thing to consider when choosing Script-Fu vs. Python is, who is your customer for the scripts? The important advantage that Script-Fu has over Python is that every installation of GIMP is guaranteed to have Script-Fu, whereas Python support is not guaranteed.

Kevin

No longer true... 2.8 Windows installers come with Python now.


Thanks, I wasn't sure, but then again how many of us are still using GIMP 2.6.x? ;)


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Wed Jul 18, 2012 2:52 pm  (#15) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
@Rob: Thanks for taking the time to reply with a considered opinion. I think Python is a clear choice for me!

@Paynekj: Good point and it looks like I won't be able to get away from ScriptFu from a legacy point of view. Generally I will be writing scripts for my needs with the intent of sharing any I think generally useful, interesting or educational. I figure if someone really needs (or more likely wants ;) ) a particular plugin they'll install python if required.

For the record I'm still using Gimp2.6 on Windows and found installing python pain free following this guide http://www.gimpusers.com/tutorials/install-python-for-gimp-2-6-windows


Top
 Post subject: Re: Best Place to discuss Gimp Script-Fu
PostPosted: Fri Jul 20, 2012 9:35 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 5420
Location: Northwest Ohio
Actually I'm still using 2.6 occasionally. My 2.8 is quite lean, I haven't put much new stuff into it yet, so when I need something in 2.6, I use that one, if not I use 2.8.


Top
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) how to place text exactly into the picture - is there any help?

8

No new posts Attachment(s) Sliding-into-Place Animation Plug-in

5

No new posts You Draw, then the Robot/Computer will Place it Game

11

No new posts Attachment(s) My plan to deal with many bevel algorithms (put them all in one place)

13

No new posts Place a Star on the center of the Canvas (Solved)

4



* Login  



Powered by phpBB3 © phpBB Group