Post Reply 

How to 'Script-Fu' an action....

Jan 16, 2012, 12:02
Post: #1
How to 'Script-Fu' an action....
Hello, Greeting from the cold northeast of the UK.

I have a load of images i want to do the same thing to... and figured a script-fu needed to be created in the console.... problem is, i dont understand where to put my variables.

Please can you help?

What am I trying to do? - I'm taking a scanned image of a black logo which is now a gif. the gif that has 'shades of dark' and black on a transparent background > I am then making a whole new gif which is the same logo (but 100% black) and replacing the original.

1) I open an image FILE > Open > double click.... etc.... it opens as a layer called "Background (100ms)" [please note i have no idea where the 100ms bit comes from - but it does]

2) I can right click the layer thumbnail and 'Alpha to Selection' which works (but i have lots to do so i open the console and had a go ...... I guessed the script-Fu in the console for this is action was....

(gimp-selection-layer-alpha layer)

but where do i type the name of the layer? I always get the message

Error: eval: unbound variable: layer

*at this point i fail to progress any further

anyway..... this is what i hope to do and would love some help please...

1)open a .gif image
2)Alpha to selection' on the layer that just opened. (gimp-selection-layer-alpha layer)
3)Create new layer (gimp-image-add-layer image layer position) ????
4)Fill new layer selection with FG colour (in this case black)
5)turn off original background layer
6)save image as *.gif.


Many thanks
Find all posts by this user
Quote this message in a reply
Jan 16, 2012, 14:12
Post: #2
RE: How to 'Script-Fu' an action....
thank you both.
I used ofnut's 'alphalock' button and did all 78 logos by hand (with a few keyboard shortcuts to make it quicker.....

i'm affraid i couldn't get the numeric thing to work either. i tried in both python and script-fu. but i got a more interesting error message/...

> (gimp-selection-layer-alpha 1)
Error: Procedure execution of gimp-selection-layer-alpha failed on invalid input arguments: Procedure 'gimp-selection-layer-alpha' has been called with an invalid ID for argument 'layer'. Most likely a plug-in is trying to work on a layer that doesn't exist any longer.


is there an 'idiots guide' to scripting fu (or python for that matter) in GIMP.

btw - im running linux mint 12

tahnks
Find all posts by this user
Quote this message in a reply
Jan 16, 2012, 15:40
Post: #3
RE: How to 'Script-Fu' an action....
thanks so much.
God bless.
Rick
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Create new images button & Save as override from Script-fu beniman 6 969 Sep 10, 2014 10:10
Last Post: beniman
  how to create a shortcut for the action crop? Paul 3 690 Jul 8, 2014 09:26
Last Post: rich2005
  Line Script 2Old 6 977 Feb 6, 2014 18:50
Last Post: 2Old
  How to record action for automatic repeat umen 1 1,307 Aug 23, 2013 20:00
Last Post: umen
  Script Fu Slandingo 1 1,362 Jun 14, 2013 20:26
Last Post: rich2005

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS