Re: [Gimp-user] Script-Fu help?

2007-11-07 Thread Tobias Jakobs
On Nov 7, 2007 8:53 PM, Dave 77459 <[EMAIL PROTECTED]> wrote:
> I have some scripts I am upgrading to work with 2.4.  What is the best place
> to find help?

This list is the right place. I think the fastes way to get help is
the GIMP IRC channel.
If you are updating from 2.2 to 2.4 you can find here an Script-Fu
Migration Guide:
http://gimp.org/docs/script-fu-update.html

Regards,
Tobias
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Script-Fu help?

2007-11-07 Thread Dave 77459
I have some scripts I am upgrading to work with 2.4.  What is the best place
to find help?

I've asked the question before in this list, and found help here. I don't
want to send these help requests if they are unwelcome or if there is an
official, better place.  Gimp-developer seems focused on changing the
source, rather than scripts.

TIA,

Dave
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-fu help

2007-05-29 Thread RalfGesellensetter
Am Montag 28 Mai 2007 21:13 schrieb ASJF:
> I
> have change something but I don't remember what...
> Can someone help me?

Don't you have a working copy? If you don't use a CVS/SVN, you might get 
help from diff (or kdiff3 if you use KDE).

Otherwise: Thanks for sharing your script ;)
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-fu help

2007-05-28 Thread saulgoode
Quoting ASJF <[EMAIL PROTECTED]>:

> Hi everybody !
>
> I have made a script to resize picture... but it doesn't work anymore, I
> have change something but I don't remember what...
> Can someone help me?

I suspect that you are using the development version (2.3) of the GIMP  
and your difficulty is caused by the fact that Script-fu has become  
more demanding that you follow proper Scheme programming guidelines  
than it used to be.

In previous versions of Script-fu, you were allowed to 'set!' an  
undeclared variable and Script-fu would happily go ahead and define it  
for you. This is no longer acceptable -- you must declare your  
variables (with either 'define' or 'let*') before you use them.

In particular, you have two variables -- 'f1-height' and 'f1-width' --  
which need to be included in your 'let*' block. Once you do this, I  
think you will find your script to be functional.

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Script-fu help

2007-05-28 Thread ASJF
Hi everybody !

I have made a script to resize picture... but it doesn't work anymore, I 
have change something but I don't remember what...
Can someone help me?
Thanks a lot !

Jeff




Here is my code :

(define (script-fu-image-resize filename f-width f-height f-quality)
  (let* (
 (img 0)
 (drw 0)
 (height1 0)
 (width1 0)
 (fileparts (strbreakup filename "."))
 )
(set! img (car (file-jpeg-load 1 filename filename)))
(set! height1 (car (gimp-image-height img)))
(set! width1 (car (gimp-image-width img)))
(if (< height1 width1)
(begin
  (set! f1-height f-height)
  (set! f1-width f-width)
  )
)
(if (> height1 width1)
(begin
  (set! f1-height f-width)
  (set! f1-width f-height)
  )
)
;; set image resolution to 72dpi
(gimp-image-set-resolution img 72 72)
;; create 'full-size' image
(gimp-image-scale img f1-width f1-height)
;; also flatten image to reduce byte storage even further
(set! drw (car (gimp-image-flatten img)))
;; save at quality level of .75 (gimp default) - saves storage
(file-jpeg-save 1 img drw
(string-append (car fileparts) "-mini.jpg")
(string-append (car fileparts) "-mini.jpg")
f-quality 0 0 0 " " 0 1 0 1)
)
  )
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-fu help?

2006-08-04 Thread saulgoode

Quoting William Fishburne <[EMAIL PROTECTED]>:


I'm processing text images for Project Gutenberg (www.gutenberg.net)
and I'd like to have a script-fu script that would take a list of files
(preferably a file glob) and do the following:

* read in the file (a png file that is RGB)
* Desaturate HSV
* Merge the layers of the desaturated image
* Save the file to a new directory, but with the same name


Download the script from  
http://flashingtwelve.brickfilms.com/GIMP/Scripts/batch-grayscale.scm  
and place it in your "~/.gimp-2.2/scripts/" directory (or other  
appropriate location). You should then be able to call the function  
from a shell using a command similar to the following:


gimp --no-data --no-interface -b '(batch-grayscale-image  
"filename1.png /home/saul/images/*.png books/covers/Twain*.png"  
"/home/saul/GrayscaleVersions/" 0)' '(gimp-quit 0)'


The first parameter to the function 'batch-grayscale-image' is a  
file-glob string and can be a list of discrete filenames, a wildcard  
expression, or a combination of both. The second parameter is a  
directory name string (it does not matter if the trailing slash is  
present or not) and this directory must already exist. The third and  
final parameter is the "method" to be employed to effect the  
conversion. It is a number ("0", "1", or "2") and has the following  
meaning:


0 = Value: the same result as the "Value" channel of an  
HSV decompose

1 = Channel mixer: the same result as changing the image mode to Grayscale
2 = Desaturate:the same result as performing a desaturate on the layer

For what it's worth, the script is not limited to PNG files; but if  
other types are used, only the top layer is converted to grayscale, no  
merging of multiple layers takes place, and the output file is of the  
same type.


If you encounter any difficulties or require further customization of  
the script, feel free to let me know and I will be more than happy to  
do what I can to assist (I am a great fan of Project Gutenberg).  
Hopefully, you are not using Windows as I have experienced some  
difficulty with Windows using my scripts from the command line (mostly  
due to their peculiar employment of the backslash).


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Script-fu help?

2006-08-04 Thread William Fishburne

Hi,

I'm processing text images for Project Gutenberg (www.gutenberg.net) and  
I'd like to have a script-fu script that would take a list of files  
(preferably a file glob) and do the following:


* read in the file (a png file that is RGB)
* Desaturate HSV
* Merge the layers of the desaturated image
* Save the file to a new directory, but with the same name

This should be simple, but I can't get the hang of script-fu (my lisp is  
terribly rusty).  I can't even find the right commands.  Can some kind  
soul help me?


I'm assuming this could be done non-interactively and that I'd just have  
to pass the script the file glob and the name of the new directory.


Thank you so very much,

William Fishburne
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


RE: [Gimp-user] Script-Fu Help

2003-09-28 Thread G . DeSercey
-Modify all three defines to include one more parameter, as such: (define
(... s-offset-y bg-colour)

-Modify the call to apply-3d-outline-logo-effect in the two
(script-fu-3d-outline-... to include the same parameter:
(apply-3d-outline-logo-effect ... s-offset-y bg-colour)

-In each script-fu-register, add the line:
SF-COLOR _"Background Colour" '(255 255 255))
below the last SF-ADJUSTMENT ... and remove the second closing bracket at
the end of that line so it reads: SF-ADJUSTMENT _"Shadow Y offset" '(0 0 200
1 5 0 1)

-Finally, in apply-3d-outline-logo-effect find the line: (gimp-invert layer
3) and add the following immediately after: (gimp-by-color-select layer3
'(255 255 255) 0 REPLACE FALSE FALSE 0 FALSE) (gimp-palette-set-background
bg-colour) (gimp-edit-fill layer3 BG-IMAGE-FILL) (gimp-selection-none img)

Guillaume 

> -Original Message-
> From: Zeke Lightwave [mailto:[EMAIL PROTECTED]
> Sent: 26 September 2003 07:20
> To: [EMAIL PROTECTED]
> Subject: [Gimp-user] Script-Fu Help
> 
> 
> I'm trying to edit the 3D-Outline script so I can change the
> background 
> to being something non-white, can anybody help me with this? 
> I've looked 
> at the source and tried changing the colors where it set's the bg/fg, 
> but that didn't help . . TIA.
> 
> -Brent G
> 
> ___
> Gimp-user mailing list
> [EMAIL PROTECTED]
> http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
> 
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-Fu Help

2003-09-26 Thread Zeke Lightwave
Jeff Trefftzs wrote:
On Thu, 2003-09-25 at 23:20, Zeke Lightwave wrote:

I'm trying to edit the 3D-Outline script so I can change the background 
to being something non-white, can anybody help me with this? I've looked 
at the source and tried changing the colors where it set's the bg/fg, 
but that didn't help . . TIA.


The right place to change things is in the line that looks like this:

 (gimp-palette-set-background '(255 255 255))

near the beginning of the apply-3d-outline-logo-effect function.  It's
at line 43.
For a quick-n-dirty fix, simply enter the RGB values for the background
color you want;  for a better fix, you might want to add a background
color parameter that defaults to white.
 I haven't tested this -- just took a quick look at the code.

HTH,
Tried that and it's still not working :-/

(gimp-selection-all img)
(gimp-patterns-set-pattern text-pattern)
(gimp-bucket-fill pattern PATTERN-BUCKET-FILL NORMAL 100 0 FALSE 0 0)
(plug-in-bump-map noninteractive img pattern layer2 110.0 45.0 4 0 
0 0 0 TRUE FALSE 0)

(set! pattern-mask (car (gimp-layer-create-mask pattern ALPHA-MASK)))
(gimp-image-add-layer-mask img pattern pattern-mask)
(gimp-selection-all img)
(gimp-edit-copy layer3)
(set! floating_sel (car (gimp-edit-paste pattern-mask 0)))
(gimp-floating-sel-anchor floating_sel)
(gimp-image-remove-layer-mask img pattern APPLY)
(gimp-invert layer3)
I know it has to be somewhere in there where the problem is :-/

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-Fu Help

2003-09-26 Thread Jeff Trefftzs
On Thu, 2003-09-25 at 23:20, Zeke Lightwave wrote:
> I'm trying to edit the 3D-Outline script so I can change the background 
> to being something non-white, can anybody help me with this? I've looked 
> at the source and tried changing the colors where it set's the bg/fg, 
> but that didn't help . . TIA.

The right place to change things is in the line that looks like this:

 (gimp-palette-set-background '(255 255 255))

near the beginning of the apply-3d-outline-logo-effect function.  It's
at line 43.

For a quick-n-dirty fix, simply enter the RGB values for the background
color you want;  for a better fix, you might want to add a background
color parameter that defaults to white.

 I haven't tested this -- just took a quick look at the code.


HTH,
-- 

--Jeff

Jeff Trefftzs <[EMAIL PROTECTED]>
http://www.tcsn.net/trefftzsHome Page
http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery
http://trefftzs.topcities.com/  Photo Gallery 

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


[Gimp-user] Script-Fu Help

2003-09-25 Thread Zeke Lightwave
I'm trying to edit the 3D-Outline script so I can change the background 
to being something non-white, can anybody help me with this? I've looked 
at the source and tried changing the colors where it set's the bg/fg, 
but that didn't help . . TIA.

-Brent G

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user


Re: [Gimp-user] Script-Fu Help (beginner)

2002-09-06 Thread Jeff Trefftzs

Hi Keith -

I just tried the same thing on a Linux system - I think the problem is with 
the dynamic text layer.  Try using Layer to Imagesize on that layer first, 
before calling the alpha to logo script-fu.  I haven't had a chance to look at 
the neon script-fu code yet, but it looks like it's not handling the smaller 
layer properly.

HTH,


-- 
--Jeff

Jeff Trefftzs <[EMAIL PROTECTED]>
http://www.tcsn.net/trefftzsHome Page
http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery
http://trefftzs.topcities.com/home.html Photo galleries



___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



RE: [Gimp-user] Script-Fu Help (beginner)

2002-09-06 Thread Walker, Sam

Try reducing the "Effect Size" parameter in the Neon script arguments GUI.

I'm not sure exactly how it is used in the script, but in general it seems
larger numbers make the neon glow more blurred, and smaller numbers are less
blurred.
On my Windows installation the default was too large, and completely blurred
out the image I was trying to use.  I reduced it by a third and the results
were much better.

Regards,
Sam

-Original Message-
From: Patrick [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 06, 2002 10:36 AM
To: '[EMAIL PROTECTED]'
Subject: Re: [Gimp-user] Script-Fu Help (beginner)


On Friday 06 September 2002 11:08, Allen, Keith wrote:
> Hi,
>
> I'm trying to create a simple GIF with some "fancy" text for
> inclusion on a web page.  I want to use the "neon" script-fu to make
> the text look like it is neon-lighted.  I created a new image (RGB)
> with a white background.  Then I created text with the dynamic text
> rendering filter.  Next, I selected the layer created by that filter,
> and selected the text on the image.  I next invoked the script-fu
> using the defaults.  The script, however, does not seem to work.  It
> seems to clear the text and creates two new layers with the neon blue
> color and black background color, but they are just solid colors.  No
> neon effect.
>
> Am I not using this script-fu correctly (I couldn't find
> instructions)?  Or do script-fu not work well on Windows?  I am
> running the latest GIMP version on the windows page.  It's installed
> on a Windows 2000 Pro computer with 500M RAM.
>
> I tried a few of the other text-logo script-fu and they also did not
> work. Otherwise, GIMP seems to work all right.  Thanks.
>
>
> Keith Allen
=

Keith,
Other than the fact you are using Windows, the plugin should work.  ;o)

I have used this effect before with Gimp and it works quite nicely, but 
then I am on Linux too!  :o)  Have you tried just taking some text and 
nothing else and applying the plugin?  You could do that and then add 
the text to the picture as another layer, if that works.  I have always 
just used the text I wanted for this plugin and that has worked for me.  
One of the experts here may have another solution.  I am not sure how 
many Gimp/Windows users we have on the list, but I would think someone 
has a solution, if mine doesn't work for you.

Patrick
-- 
   --- KMail v1.4.3 --- SuSE Linux Pro v8.0 ---
  Amiga, SuSE Linux, PC Sales & Service
 Magic Page Products
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



Re: [Gimp-user] Script-Fu Help (beginner)

2002-09-06 Thread Patrick

On Friday 06 September 2002 11:08, Allen, Keith wrote:
> Hi,
>
> I'm trying to create a simple GIF with some "fancy" text for
> inclusion on a web page.  I want to use the "neon" script-fu to make
> the text look like it is neon-lighted.  I created a new image (RGB)
> with a white background.  Then I created text with the dynamic text
> rendering filter.  Next, I selected the layer created by that filter,
> and selected the text on the image.  I next invoked the script-fu
> using the defaults.  The script, however, does not seem to work.  It
> seems to clear the text and creates two new layers with the neon blue
> color and black background color, but they are just solid colors.  No
> neon effect.
>
> Am I not using this script-fu correctly (I couldn't find
> instructions)?  Or do script-fu not work well on Windows?  I am
> running the latest GIMP version on the windows page.  It's installed
> on a Windows 2000 Pro computer with 500M RAM.
>
> I tried a few of the other text-logo script-fu and they also did not
> work. Otherwise, GIMP seems to work all right.  Thanks.
>
>
> Keith Allen
=

Keith,
Other than the fact you are using Windows, the plugin should work.  ;o)

I have used this effect before with Gimp and it works quite nicely, but 
then I am on Linux too!  :o)  Have you tried just taking some text and 
nothing else and applying the plugin?  You could do that and then add 
the text to the picture as another layer, if that works.  I have always 
just used the text I wanted for this plugin and that has worked for me.  
One of the experts here may have another solution.  I am not sure how 
many Gimp/Windows users we have on the list, but I would think someone 
has a solution, if mine doesn't work for you.

Patrick
-- 
   --- KMail v1.4.3 --- SuSE Linux Pro v8.0 ---
  Amiga, SuSE Linux, PC Sales & Service
 Magic Page Products
___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



[Gimp-user] Script-Fu Help (beginner)

2002-09-06 Thread Allen, Keith

Hi,

I'm trying to create a simple GIF with some "fancy" text for inclusion on a
web page.  I want to use the "neon" script-fu to make the text look like it
is neon-lighted.  I created a new image (RGB) with a white background.  Then
I created text with the dynamic text rendering filter.  Next, I selected the
layer created by that filter, and selected the text on the image.  I next
invoked the script-fu using the defaults.  The script, however, does not
seem to work.  It seems to clear the text and creates two new layers with
the neon blue color and black background color, but they are just solid
colors.  No neon effect.

Am I not using this script-fu correctly (I couldn't find instructions)?  Or
do script-fu not work well on Windows?  I am running the latest GIMP version
on the windows page.  It's installed on a Windows 2000 Pro computer with
500M RAM.

I tried a few of the other text-logo script-fu and they also did not work.
Otherwise, GIMP seems to work all right.  Thanks.


Keith Allen


___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



Re: [Gimp-user] Script-fu help, problems using gimp-file-save

2001-04-09 Thread Ryan Schuermann

worked great, thanks!

Ryan

Jeff Trefftzs wrote:

> (set! layer-save (gimp-image-merge-visible-layers img
> EXPAND-AS-NECESSARY))
> (gimp-convert-indexed img 0 2 0 0 0 "")
> (gimp-file-save 1 img layer-save "test.gif" "test.gif")
>
> Have you tried
> (gimp-file-save 1 img (car layer-save) "test.gif" "test.gif")
>
> The gimp functions all return a list, not just a value, so maybe
> that's your problem.  layer-save is actually a list, not a
> drawable identifier.
>
> HTH,
> --
> --Jeff
> Jeff Trefftzs <[EMAIL PROTECTED]>
> http://www.tcsn.net/trefftzsHome Page
> http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery
> http://members4.clubphoto.com/jeff309574A photo gallery
>
> ___
> Gimp-user mailing list
> [EMAIL PROTECTED]
> http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user

--
.-.--.-.
\ Ryan Schuermannn \ www.hire.com \ Web Programmer-Modeler  \
 \ 512-583-4734.wrk \ [EMAIL PROTECTED]\ Visualize Whirrled Peas \
  \ 832-722-7961.cel \ [EMAIL PROTECTED]  \ http://www.nol.net/~rts \



___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



Re: [Gimp-user] Script-fu help, problems using gimp-file-save

2001-04-09 Thread Jeff Trefftzs

(set! layer-save (gimp-image-merge-visible-layers img 
EXPAND-AS-NECESSARY))
(gimp-convert-indexed img 0 2 0 0 0 "")
(gimp-file-save 1 img layer-save "test.gif" "test.gif")

Have you tried 
(gimp-file-save 1 img (car layer-save) "test.gif" "test.gif")

The gimp functions all return a list, not just a value, so maybe 
that's your problem.  layer-save is actually a list, not a 
drawable identifier.

HTH,
-- 
--Jeff
Jeff Trefftzs <[EMAIL PROTECTED]>
http://www.tcsn.net/trefftzsHome Page
http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery
http://members4.clubphoto.com/jeff309574A photo gallery



___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



[Gimp-user] Script-fu help, problems using gimp-file-save

2001-04-09 Thread Ryan Schuermann

I wrote a script and it displays fine, and i can go to file->save and save
as a gif directly (so it's indexing correctly) and its only 1 layer, but I get
an

ERROR: Invalid types specified for arguments
when i try to use gimp-file-save

heres the jist of it
(img (car (gimp-image-new 256 256 RGB)))
...
(gimp-selection-none img)
(gimp-image-clean-all img)
(set! layer-save (gimp-image-merge-visible-layers img EXPAND-AS-NECESSARY))
(gimp-convert-indexed img 0 2 0 0 0 "")
(gimp-file-save 1 img layer-save "test.gif" "test.gif")
;(gimp-display-new img)


am I missing a step in order to save gif files? I get it to display perfectly
and
save thru the menu, it just doest like to script-fu save. I'm trying to follow

Adrian Likins's instructions that are very good, it's just not working for me.

thanks
Ryan

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user



[Gimp-user] Script-Fu help?

2001-03-26 Thread Ryan Schuermann

ok, ive read most all the docs i can find, i have a simple problem,
hoping someone can enlighten me with the proper gimp command.

I'm creating an image, i need the background to stay transparent,
ive created a text later and a layer with a rectangle, and a layer for
2 circles, however when i create the 2 circles it doesn't take a layer
parameter but seems to draw it to the image ,then by calling
gimp-edit-fill i get the circles to appear solid..however i am getting
a lot of garbage around the circles.

here are the commands related to the circe layer, what should i call
before
or after or during to clean out this layer back to pure transparent?
(let* (
...
(circle-layer (car (gimp-layer-new img img-width img-height RGBA_IMAGE
"circle-layer" 100 NORMAL)))
)
...
(gimp-image-add-layer img circle-layer 1)
...
(gimp-layer-set-offsets circle-layer 0 0)
...
(gimp-ellipse-select img 0 0 img-height img-height REPLACE TRUE FALSE 0)

(gimp-ellipse-select img (- img-width img-height) 0 img-height
img-height ADD TRUE FALSE 0)
(gimp-edit-fill circle-layer BG-IMAGE-FILL)
...
(gimp-display-new img)



thanks
Ryan

___
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user