Hi,

On Sun, 2007-06-03 at 20:37 -0400,
[EMAIL PROTECTED] wrote:

> ;;----------------------------------------------------------
> ;; 'add-comment' attaches "gimp-comment" parasite to 'image'
> ;;               with the value of the passed 'string'
> ;;
>    (define (add-comment image string)
>      (*catch 'errobj
>        (gimp-image-parasite-find image "gimp-comment")
>        (if (not (null? errobj))
>          (gimp-image-parasite-detach image "gimp-comment")
>          )
>        )
>      (gimp-image-parasite-attach (list "gimp-comment"
>                                         3
>                                         (bytes-append string)))
>      )

Why do you detach the parasite first? Shouldn't it be sufficient to just
attach the new one? If I remember correctly, that should replace a
parasite if one already exists under that name.


Sven


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

Reply via email to