script-fu and int8array

script-fu and int8array

Post by Thomas Rolle » Wed, 06 Oct 1999 04:00:00


I want to use the function

(gimp-curves-explicit image drawable channel num_bytes curve)


(gimp-curves-spline image drawable channel num_points control_pts)

in script-fu.

curve or control_pts shall be entered as an INT8ARRAY.

Can somebody tell me in what format (syntax) the points or a curve will
be written ???

An example would be helpfull



1. script-fu: what's an INT8ARRAY?

Can anyone tell me what an INT8ARRAY is?

I presumed that it's a list of 8bit values, but I can't seem to get
anything to work using this
notion. For instance, the following function is supposed to write to a
particular point in a drawable:

(define (test a bk inv)
         ; create image and layer
  (set! img
        (car (gimp-image-new a a 0)))
  (set! layer
        (car (gimp-layer-new img a a
              0 "layer 1" 100 0)))
  (gimp-image-disable-undo img)
  (gimp-image-add-layer img layer 0)
  (cond ((equalp inv 0)
         (gimp-palette-set-background bk)))
  (gimp-edit-fill img layer)
  (gimp-drawable-set-pixel layer 10 10 3 '(128 64 128))
  (gimp-display-new img)
  (gimp-image-enable-undo img))

 "test"          ; name of func
 "<Toolbox>/Xtns/Script-Fu/Utils/Test" ; menu posn.
 "Does something"  ; help string
 "I. Am"           ; author
 "It's mine"       ; copyright
 "Today"           ; date
 ""                ;accepts any image type
 SF-VALUE "size" "128"  ; value param
 SF-COLOR "bk" '(0 0 0) ; color param
 SF-TOGGLE "inv" 0      ; boolean

However, I get an error message when I try to use it, saying that
there's a type
mismatch (and suggesting I may not have installed the correct font!).

Afzal Ballim - MEDIA Research Group (LITH-EPFL)
Swiss Federal Institute of Technology, IN Ecublens, 1015 Lausanne, Switzerland
 Voice: (+41 21) 693 52 34   |  fax: (+41 21) 693 52 78

2. Radiosity

3. Script-Fu from Perl-Fu non-interactively


5. Gimp 1.2.3 - Script-Fu freezing

6. SIGGRAPH Proceedings

7. Script-fu buttons

8. Hand made bevels

9. finding function name for script-fu

10. Help Problem PERL-Fu script logo creation

11. script-fu, string parsing

12. Script-fu Group

13. script-fu, pupi-button and dynamic text