Previous | Next

Script-fu “Hello world”

(define (script-fu-helloworld text font size colour)
 (let* (
    (img   (car (gimp-image-new 1 1 RGB)))
    (text-layer
           (car (gimp-text-fontname img -1 0 0 text
                                    10 TRUE size
                                    PIXELS font)))
    (width (car (gimp-drawable-width text-layer)))
    (height (car (gimp-drawable-height text-layer)))
       )

   (gimp-image-resize img width height 0 0)

   (gimp-display-new img)
))
Lisp stands for "Lots of Irritating Stupid Parentheses"