On 2002-12-10 at 2025.25 +0100, Urke MMI typed this:
> Hello,
> I have GIMP 1.2.3 for Linux and need script that well automate creating of
> modified menu for my site. Script must to:
> 1) Flatten active image
> 2) Select rectangular from top left corner (0x0) in size of 171x111 pixel
> 3) Copy selection, make new image 171x111 in size, paste copied selection
> from previous step in new image, flatten this image (if needed) and convert
> to Indexed mode with 50 colors, and then save this image as top.png and
> then close this image
> 4) Make relevance selections in base image in dimensions 171x19 pixel,
> eight times, first selection start at 0x112 pixel left x down), and every
> other +19 pixel, then all other like for top.png image, but with name
> btn0[number_of_image].png, same png properties
> 5) Make one selection 171x54 from 0x264, and all other manipulation like
> for other images, but with bottom.png name.
> 6) Else I will upgrade my self
> Because I'm script newbie, I need one example for this and I will enhance
> this basics to what I need in future.
> If there is some tool to record actions in GIMP like in Adobe Photoshop,
> that well be pretty nice and usefull (I think :).
i started to put together the screenshots for a tutorial i would like to
write about using the gimp pdb for script writing.

first thing you need to do is choose your flavor of scripting.  the last
i knew, gimp can be scripted in python, perl or a lisp thing called
script fu.  

they all have different strengths and draw backs.

Xtns -->Script-fu -->Console Browse ...
these scripts will work with WinGIMP and The GIMP and will probably work 
with some rewriting on gimp-1.3. 

the draw back for me was that i wasn't able find a book that to help.

however, since then i found these:

example scripts can be found in your source:

Xtns -->Perl
there is all kinds of documentation and books.  big plus.  i didn't know
anything about scripting and was able to find help and examples all over
the place.  

draw backs.  so far it will only work on the linux gimp. and only on


example scripts can be found in your source:

personally, i was able to write this.  i have a hard time reading what i
wrote even 15 minutes later ...

Xtns -->Python-Fu -->Console
this works for linux gimp-1.2 and in gimp-1.3.  it has good
documentation.  people who have been coding a lot don't mind helping
with it either.

drawbacks, no WinGIMP.  also, you have to download it and install it for
gimp-1.2. (builds now with 1.3).  good documentation, but not alot. like
the nutshell book is due but not out yet.  python.org is prolly all you
would need for the non-gimp stuff though.  i have the Python Cookbook,
and it is really nice.  wish i understood more of it ...

also, there are not as many script samples.  but the good ones are

you can get it here:
documentation here:
for the actual python in your script:

example scripts can be found in the pygimp source:

i am using python lately.  i don't like begging for help.  you can just
ask for python help (seemingly).  python has handled many of my problems
with regexp. the fact it works now in 1.3 is an issue for me also.

with very little experience, i was able to make the gimp work via a
script without alot of help.  you will have definate questions soon
enough ;)

but the samples you need are in the source.  better written than i can
do yet ;)


Gimp-user mailing list

Reply via email to