Hi people,

I'm beginning to work with script-fu and I'm having a little difficulty
to load two images and paste one into other.

I'm wondering how do I know which is the reference to the background
layer of a image that I've just opened. I think that my error is
occurring when I try to pass the drawable references to the
gimp-edit-copy/paste functions. I simple passed "0" (I don't know any
reference, so I thought that "0" would refer to first layer in the
stack), but it's not working...

This is what I've tried:

(define (teste fileImg1 fileImg2)

  ; Ahh! Other question: what is the difference between these guys?
  ;                                                     -----
  ;                                     ------------------/
  ;                                     |        |

  (set! img1 (car (gimp-file-load 0 fileImg1 fileImg1)))
  (set! img2 (car (gimp-file-load 0 fileImg2 fileImg2)))
  (gimp-edit-copy img1 0)
  (gimp-edit-paste img2 0 TRUE)
  (gimp-display-new img2)
  SF-VALUE "Image 1: " "\"mapafinal.jpg\""
  SF-VALUE "Image 2: "


Reply via email to