Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > GIMP (GNU Image Manipulation Program) > Re: making a sc...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 14 of 24 Topic 3079 of 3157
Post > Topic >>

Re: making a script

by houghi <houghi@[EMAIL PROTECTED] > Sep 26, 2008 at 01:15 AM

houghi wrote:
>> To use the "script-fu-fuzzy-border" function in batch
>> mode you need to first execute the required gimp
>> functions to load an image by reading one from a file.
>
> OK and how do I do that?

OK, I am again loosing several hours over this. I start with
http://www.gimp.org/tutorials/Basic_Batch/
and that works.

What I see there is absolutely no serious attempt to explain anything.
It is more a 'How to drive a car? You step in and drive away.' type of
thing. Pity to see that sch a thing where the GIMP could beat anything
is so neglected. :-( Anywah ..

I see two places where things are defined. The first is the define of
simple-unsharp-mask. The second is the plug-in-unsharp-mask.

Let me look at the first thing. There I see respectivaly filename,
radius, amount and threshold. Those are used as well in the commandline
with "foo.png" 5.0 0.5 0.

However when I look in Xtns, I see much more parameters. With a lot of
trial and error I was able to make a sharpen script that worked.

So I then try to re-write it for the fuzzy border and get to the
following:
(define (border-fuzz filename
                color
                value
                toggle
                value
                toggle
                value
                toggle
                toggle
                )
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename
filename)))
(drawable (car (gimp-image-get-active-layer image)))) 
(script-fu-fuzzy-border RUN-NONINTERACTIVE
                           image drawable 
		color
                value
                toggle
                value
                toggle
                value
                toggle
                toggle  
                )
(set! drawable (car (gimp-image-get-active-layer image)))
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image)))

As command I give the following on one line:
gimp -i -b '(border-fuzz "foo.png" (0;0;0) 50 0 50 0 0 0 0)' -b
'(gimp-quit 0)'

It tells me it is successfull and nothing happens. I have no idea where
I am going wrong as there is no do***entation available. I also doubt
that I am the only person in the world wjo wants to use gimp in a script
mode. So please can somebody show me what it must be instead of what I
have. No explanation, just the raw code. I can then try to fugure out
myself what I am doing wrong and apply it to other things.

I will then probably even write it all down for others to use.

houghi
-- 
The whole principle [of censor****p] is wrong. It's like demanding that 
grown men live on skim milk because the baby can't have steak.
		-- Robert A. Heinlein in "The Man Who Sold the Moon"
 




 24 Posts in Topic:
making a script
-=MrX=- <herrie@[EMAIL  2008-09-22 18:41:57 
Re: making a script
houghi <houghi@[EMAIL   2008-09-22 21:21:18 
Re: making a script
houghi <houghi@[EMAIL   2008-09-22 23:24:26 
Re: making a script
-=MrX=- <herrie@[EMAIL  2008-09-23 16:51:10 
Re: making a script
houghi <houghi@[EMAIL   2008-09-23 17:07:05 
Re: making a script
houghi <houghi@[EMAIL   2008-09-23 22:24:15 
Re: making a script
-=MrX=- <herrie@[EMAIL  2008-09-24 16:03:14 
Re: making a script
houghi <houghi@[EMAIL   2008-09-24 16:53:08 
Re: making a script
-=MrX=- <herrie@[EMAIL  2008-09-25 08:21:13 
Re: making a script
houghi <houghi@[EMAIL   2008-09-25 11:20:33 
Re: making a script
Troy Piggins <usenet-0  2008-09-23 08:00:12 
Re: making a script
floyd@[EMAIL PROTECTED]   2008-09-25 04:57:05 
Re: making a script
houghi <houghi@[EMAIL   2008-09-25 16:05:01 
Re: making a script
houghi <houghi@[EMAIL   2008-09-26 01:15:43 
Re: making a script
Niels Giesen <niels.gi  2008-09-26 09:53:44 
Re: making a script
houghi <houghi@[EMAIL   2008-09-26 12:04:58 
Re: making a script
Giacomo Boffi <giacomo  2008-09-26 12:34:41 
Re: making a script
houghi <houghi@[EMAIL   2008-09-26 12:56:37 
Re: making a script
Niels Giesen <niels.gi  2008-09-26 22:03:52 
Re: making a script
houghi <houghi@[EMAIL   2008-09-26 20:38:05 
Re: making a script
floyd@[EMAIL PROTECTED]   2008-09-26 01:21:17 
Re: making a script
houghi <houghi@[EMAIL   2008-09-26 12:51:49 
Re: making a script
houghi <houghi@[EMAIL   2008-09-26 22:13:07 
Re: making a script
Dirk Dietrich <kaufinf  2008-10-03 18:16:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Dec 4 17:24:22 CST 2008.