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"


|