Re: Using parasites in script-fu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK -

This could be a problem with tinyscheme and parasites.

Here is a a console trace:

> (gimp-parasite-list)
(1 ("exif-orientation-rotate"))
> (gimp-parasite-attach (list "test-counter" 1 "123"))
(#t)
> (gimp-parasite-list)
(2 ("exif-orientation-rotate" "test-counter"))
> (gimp-parasite-find "test-counter")
(("test-counter" 1 ""))
> (gimp-parasite-attach (list "test-counter" 1 "123"))
(#t)
> (gimp-parasite-find "test-counter")
(("test-counter" 1 "123"))


The attach didn't work the first time, but did the second time.

-Rob A.


On Thu, Jan 29, 2009 at 4:11 PM, Rob Antonishen
<rob.antonishen@xxxxxxxxx> wrote:
> I see there are functions in the pdb to access parasites.
>
> I am working on a script that I would like to maintain a global value
> for that will persist between images and thought I could create a
> global parasite.
>
> I used this:
> (car (gimp-parasite-find "exif-orientation-rotate"))
>
> and got:
> ("exif-orientation-rotate" 1 "yes")
>
> And looking at http://developer.gimp.org/api/2.0/libgimpbase/libgimpbase-gimpparasite.html#GimpParasite
> I am guessing the structure as presented in the pdb...
>
>
> I tried to add my own global parasite by using
>
> (gimp-parasite-attach (list "test-counter" 1 123))
> and get an error "Invalid type for argument 1 to gimp-parasite-attach"
> which makes me think it doesn't want a list....or I don't know how to
> construct a parasite in scheme.
>
> Can someome point me to a sample of handling parasites in scrip-fu?
>
> Thanks,
>
> -Rob A>
>
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux