Re: [Gimp-user] Script Fu error

2008-10-15 Thread D.Jones (aka) Capnhud
Thanks that did the trick.


--- On Wed, 10/15/08, Andreas Waechter <[EMAIL PROTECTED]> wrote:

> From: Andreas Waechter <[EMAIL PROTECTED]>
> Subject: Re: [Gimp-user] Script Fu error
> To: [EMAIL PROTECTED]
> Cc: "Gimp Group" 
> Date: Wednesday, October 15, 2008, 3:55 PM
> D.Jones (aka) Capnhud wrote:
>  > Error while executing script-fu-quick-sketch2:
>  > Error: eval: unbound variable:
> script-fu-quick-sketch2
> 
> here is a 2 at the end
> 
>  > (define (script-fu-quick-sketch theImage
> 
> here is NO 2 at the end
> 
>  > (script-fu-register
> "script-fu-quick-sketch2"
> 
> here is a 2 at the end
> 
> 
> Andreas


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


Re: [Gimp-user] Script Fu error

2008-10-15 Thread Andreas Waechter
D.Jones (aka) Capnhud wrote:
 > Error while executing script-fu-quick-sketch2:
 > Error: eval: unbound variable: script-fu-quick-sketch2

here is a 2 at the end

 > (define (script-fu-quick-sketch theImage

here is NO 2 at the end

 > (script-fu-register "script-fu-quick-sketch2"

here is a 2 at the end


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


[Gimp-user] Script Fu error

2008-10-15 Thread D.Jones (aka) Capnhud
This scrip used to work in gimp 2.4.7 but when I try to execute this script 
2.6.1 I recieve this message but I am not sure what to change in order to make 
it work again:

Error while executing script-fu-quick-sketch2:
Error: eval: unbound variable: script-fu-quick-sketch2


; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
; 
; Quick sketch script  for GIMP 2.4
; Copyright (C) 2007 Harry Phillips <[EMAIL PROTECTED]>
;
; Author statement:
;
; Quick sketch turns a photo into what looks like a artists sketch
; 
;  
; Distributed by Gimp FX Foundry project 
;  
; - Changelog - 
; Last changed by author: 9 September 2007 
; 
;  
; 
; This program is free software: you can redistribute it and/or modify 
; it under the terms of the GNU General Public License as published by 
; the Free Software Foundation, either version 3 of the License, or 
; (at your option) any later version. 
; 
; This program is distributed in the hope that it will be useful, 
; but WITHOUT ANY WARRANTY; without even the implied warranty of 
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
; GNU General Public License for more details. 
; 
; You should have received a copy of the GNU General Public License 
; along with this program. If not, see . 
; 
 

(define (script-fu-quick-sketch theImage 
theLayer 
blurType) 

  ;Initiate some variables 
  (let* ( 
  (layerCopy 0) 
  (layerGrey (car (gimp-drawable-is-gray theLayer))) 
  ) 

  ;Start an undo group so the process can be undone with one undo 
  (gimp-image-undo-group-start theImage) 

  ;Rename the layer 
  (gimp-drawable-set-name theLayer "Original") 

  ;Select none 
  (gimp-selection-none theImage) 

  ;Change the image Greyscale if it isn't already 
  (if (= layerGrey 0) (gimp-image-convert-grayscale theImage)) 

  (set! layerCopy (car (gimp-layer-copy theLayer 1))) 

  ;Copy the layer 
  (gimp-image-add-layer theImage layerCopy 0) 

  ;Rename the layer 
  (gimp-drawable-set-name layerCopy "Dodge layer") 

  ;Invert the layer 
  (gimp-invert layerCopy) 

  ;Change the layers mode 
  (gimp-layer-set-mode layerCopy 16) 

  ;Blur the dodge layer 
  (case blurType 
  ((0) (plug-in-gauss 0 theImage layerCopy 1 1 0)) 
  ((1) (plug-in-mblur 0 theImage layerCopy 0 1 10 2 2)) 
  (else (plug-in-sel-gauss 0 theImage layerCopy 5 50))) 

  ;Finish the undo group for the process 
  (gimp-image-undo-group-end theImage) 

  ;Ensure the updated image is displayed now 
  (gimp-displays-flush) 

  ) 

) 



(script-fu-register "script-fu-quick-sketch2" 
  _"/Script-Fu/Illustration/Quick sketch2..." 
  "Create a sketch from a photo" 
  "Harry Phillips" 
  "Harry Phillips" 
  "Sep. 9 2007" 
  "*" 
  SF-IMAGE "Image" 0 
  SF-DRAWABLE "Drawable" 0 
SF-OPTION "Blur Type" '("Gaussian Blur" "Motion Blur" "Selective Blur") 
)


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


Re: [Gimp-user] Script-Fu error

2007-03-12 Thread Sven Neumann
Hi,

On Tue, 2007-03-13 at 05:47 +0100, Stephan Hegel wrote:

> However, I do think the problem itself will be a user issue even when I'm a
> bit ahead at the moment and have tried the developer version already. When
> you release version 2.4 (or a release candidate of it) the problem will pop
> up for users: the new Script-Fu interpreter will lead to unexpected error
> messages with existing third party scripts.
> 
> Any plans how to avoid this ?

Yes, as you probably already read in the archives, we are looking for a
volunteer to write a document that explains the changes and how to fix
scripts that stop working.

When such a document exists, we may even decide to change the error
messages and make them point to the document online.


Sven


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


Re: [Gimp-user] Script-Fu error

2007-03-12 Thread Stephan Hegel
Hello Sven,

Sven Neumann wrote:
> Since you are using the development version, you should be subscribed to
> the gimp-developer mailing-list. We haven't written a decent document
> describing the changes in Script-Fu yet, but you can read about them in
> the mailing-list archives.
Thanks for the pointer. I've found the explanation in the mailing list
archive.

However, I do think the problem itself will be a user issue even when I'm a
bit ahead at the moment and have tried the developer version already. When
you release version 2.4 (or a release candidate of it) the problem will pop
up for users: the new Script-Fu interpreter will lead to unexpected error
messages with existing third party scripts.

Any plans how to avoid this ?

Kind regards,
Stephan.

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


Re: [Gimp-user] Script-Fu error

2007-03-12 Thread Sven Neumann
Hi,

On Mon, 2007-03-12 at 07:20 +0100, Stephan Hegel wrote:

> I've tried Gimp 2.3.15 with the following script:
> http://turtle.as.arizona.edu/jdsmith/exposure-blend.scm
> 
> When launching Gimp I get the following error:
> 
> script-fu-Warning: Error while executing
> (load "/home/steve/.gimp-2.3/scripts/exposure-blend.scm")
> Error: set!: unbound variable: script-fu-exposure-blend-options
> 
> The same plug-in behaves just fine in Gimp-2.2. Any hint what's
> wrong and/or how to track this down ?

Since you are using the development version, you should be subscribed to
the gimp-developer mailing-list. We haven't written a decent document
describing the changes in Script-Fu yet, but you can read about them in
the mailing-list archives.


Sven


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


[Gimp-user] Script-Fu error

2007-03-11 Thread Stephan Hegel
Hi there,

I've tried Gimp 2.3.15 with the following script:
http://turtle.as.arizona.edu/jdsmith/exposure-blend.scm

When launching Gimp I get the following error:

script-fu-Warning: Error while executing
(load "/home/steve/.gimp-2.3/scripts/exposure-blend.scm")
Error: set!: unbound variable: script-fu-exposure-blend-options

The same plug-in behaves just fine in Gimp-2.2. Any hint what's
wrong and/or how to track this down ?

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


Re: [Gimp-user] script-fu - ERROR: bad function

2006-07-12 Thread Narushima Hironori
Wow, I modify code by refer follow code to running script!
Thank you.

(Difficult to learn new language, but script-fu is very useful. thank you.)

[EMAIL PROTECTED] wrote:

> 
> I think that what saulgoode pointed out DOES meet your trouble.
> By the error message Gimp told that the value of "(print image)"
> might not be a function (and never).
> My poor guess is:
> 
> ***
> *** 34,40 
> )
>   )
>   
> ! (if (< 0 count) (
> (print image) ;; print
> (gimp-image-convert-indexed image 0 0 255 FALSE TRUE "")
> (print image) ;; not print
> --- 34,40 
> )
>   )
>   
> ! (if (< 0 count) (begin
> (print image) ;; print
> (gimp-image-convert-indexed image 0 0 255 FALSE TRUE "")
> (print image) ;; not print

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


Re: [Gimp-user] script-fu - ERROR: bad function

2006-07-11 Thread out_of_s
> [EMAIL PROTECTED] wrote:
> > I think that there exists a problem with the construct of your IF 
> > statement.
> > 

> My scheme format might be strange.
> But that is not relation with error `ERROR: bad function.'

I think that what saulgoode pointed out DOES meet your trouble.
By the error message Gimp told that the value of "(print image)"
might not be a function (and never).
My poor guess is:

***
*** 34,40 
)
  )
  
! (if (< 0 count) (
(print image) ;; print
(gimp-image-convert-indexed image 0 0 255 FALSE TRUE "")
(print image) ;; not print
--- 34,40 
)
  )
  
! (if (< 0 count) (begin
(print image) ;; print
(gimp-image-convert-indexed image 0 0 255 FALSE TRUE "")
(print image) ;; not print
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] script-fu - ERROR: bad function

2006-07-11 Thread Narushima Hironori
[EMAIL PROTECTED] wrote:
> I think that there exists a problem with the construct of your IF 
> statement.
> 

My scheme format might be strange.
But that is not relation with error `ERROR: bad function.'

I use The GIMP for Windows (version 2.2.11) in WindowsXPSP2.
(binary founded in gimp-win.sourceforge.net)

Does an other platform not output bad function error in
(gimp-image-convert-indexed) ???

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


[Gimp-user] script-fu - ERROR: bad function

2006-07-11 Thread saulgoode

I think that there exists a problem with the construct of your IF statement.

The format of IF statements in Scheme is:

(if condition
  do_this_if_true
  do_this_if_false
  )

For example:

(if (< x 0)
  (print "X is negative")
  (print "X is positive")
  )

The "do_this_if_false" is optional but if you wish to do more than one  
thing, you must use a "(begin" ... ")" statement.


(if (< x 0)
  (begin
(print "X is negative")
(set! sign -1)
)
  (begin
(print "X is positive")
(set! sign 1)
)
  )




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


[Gimp-user] script-fu - ERROR: bad function

2006-07-10 Thread Narushima Hironori
I write follow script (convert bitmap images to join layer to distribute
animated gif file)

But I'm in stagnation. Console display only `ERROR: bad function' and
other no hint.

-- 
(define (bmp_to_gifani directory transparent-color ms-per-frame)
  (let* (
  (filelist (cadr (file-glob (string-append directory "\\*") 1)))
  (image (car (gimp-image-new 8 8 RGB)))
  (count 0)
)
(gimp-display-new image)
(while filelist
  (let* (
  (bmp-filepath (car filelist))
  (bmp-image (car (gimp-file-load
RUN-NONINTERACTIVE  
bmp-filepath
bmp-filepath)))
  (layer
(car (gimp-layer-new-from-drawable
  (car (gimp-image-get-active-layer bmp-image))
  image)))
)
(gimp-layer-set-offsets layer 0 0)
(gimp-image-add-layer image layer 0)
(gimp-image-resize-to-layers image)

(gimp-drawable-set-name layer
  (string-append
(number->string count)
" (" (number->string ms-per-frame) "ms)(replace)"))

(gimp-by-color-select layer transparent-color 2 FALSE 0 0 0 0)
(gimp-edit-cut layer)

(set! count (+ count 1))
(set! filelist (cdr filelist))
  )
)

(if (< 0 count) (
  (print image) ;; print
  (gimp-image-convert-indexed image 0 0 255 FALSE TRUE "")
  (print image) ;; not print
  ;;(print image)
  ;;(set! image (car (plug-in-animationoptimize RUN-NONINTERACTIVE
image image)))
  ;;(print directory)
  ;;(set! savepath (string-append directory ".gif"))
  ;;(print savepath)
  ;;(file-gif-save RUN-NONINTERACTIVE image image savepath savepath
0 1 ms-per-frame 2)
  ;;(print 5)
))
  )
)
--
- local environment
  c:\foo\1.bmp, c:\foo\2.bmp, c:\foo\3.bmp

and execute in console
  (bmp_to_gifani "c:" '(0 0 0) 50)

to display
  ERROR: bad function.

Stop in call (gimp-image-convert-indexed). How to invoke this method and
debug this situation?

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