Quoting Alan Campbell <gimp-u...@alancampbelllists.ukfsn.org>:

> parasites are just what I need.  Can't find much about them.
> (list "WRF_BIT_WIDTH" 1 (number->string bit-width)))
> First list member: parasite ID string.
> What's the second list member?  Flags, I understand from one search
> result I found.  Used?

To my knowledge, the FLAGS parameter controls 1) whether the parasite  
is persistent across sessions, and 2) whether adding the parasite is  
an UNDOable operation. 1) is controlled by the least significant bit  
of FLAGS, while 2) is controlled by the second bit.

This results in four possible settings:

0 - Not persistent and not UNDOable
1 - Persistent and not UNDOable
2 - Not persistent and UNDOable
3 - Persistent and UNDOable

> Third list member: parasite value (must always be a string). So an
> RGB colour value would have to be stringified. unstrbreakup maybe?

That would work.

(set! color (car (gimp-context-get-foreground))) ; as an example
(set! str (unbreakupstr (map number->string color) " "))
(set! color (map string->number (strbreakup str " ")))

> Generally: do all the gimp-*-parasite-attach methods suffer from same
> bug, so should be reapplied til they work?

I believe so. Yes.

Gimp-user mailing list

Reply via email to