RSS/Atom feed Twitter
Site is read-only, email is disabled

another prob with parasites and script-fu

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

another prob with parasites and script-fu Irek S?onina 05 Feb 23:30
  another prob with parasites and script-fu Sven Neumann 06 Feb 12:23
   another prob with parasites and script-fu Irek S?onina 06 Feb 12:49
    another prob with parasites and script-fu Sven Neumann 06 Feb 13:23
Irek S?onina
2004-02-05 23:30:01 UTC (about 20 years ago)

another prob with parasites and script-fu

My previous problem with parasites in script-fu has dissapeared in new pre3 version (thanks Sven for URL to bugreport), but now I have one another: I tried to define "gimp-comment" parasite as defined in devel-docs/parasites.txt as PERSISTENT, but this causes an execution error of the script, as well as other defines commented below, with which I have tried to run the script:

(define (script-fu-xcf2gif infile outfile) (let*
(
(img (car (gimp-file-load 1 infile infile))) (drawable (car (gimp-drawable-get-image img))) ; (parasite (list "gimp-comment" GIMP_PARASITE_PERSISTENT "some comment")) ; (parasite (list "gimp-comment" IMAGE_PERSISTENT "some comment")) ; (parasite (list "gimp-comment" PERSISTENT "some comment")) (parasite (list "gimp-comment" 1 "some comment")) )
(gimp-image-flatten img)
(gimp-image-parasite-detach img "gimp-comment") (gimp-image-parasite-attachi img parasite) (gimp-image-convert-indexed img 1 0 256 0 1 "") (file-gif-save 1 img drawable outfile outfile 1 0 0 0) )
)

from libgimpbase/gimpparasite.h: #define GIMP_PARASITE_PERSISTENT 1
so I have tried to use direct the value of it instead of define, this works (script is executed successfully) but comment is not saved in gif:

[ireks@brightstar ufki]$ identify -verbose blokada.gif|grep comment [ireks@brightstar ufki]$

Is this a bug or am I doing something wrong? If I should rather go to gimp-devel or somewhere else group please let me know.

br.

Sven Neumann
2004-02-06 12:23:10 UTC (about 20 years ago)

another prob with parasites and script-fu

Hi,

Irek S?onina writes:

My previous problem with parasites in script-fu has dissapeared in new pre3 version (thanks Sven for URL to bugreport), but now I have one another: I tried to define "gimp-comment" parasite as defined in devel-docs/parasites.txt as PERSISTENT, but this causes an execution error of the script, as well as other defines commented below, with which I have tried to run the script:

(parasite (list "gimp-comment" 1 "some comment"))

Uhm, what makes you think that you can construct a parsite using (list...) and why do you omit the data length? This can hardly work but I am afraid I cannot point you to a working example of using parasites from Script-Fu. I am not sure if this has ever been done successfully.

Sven

Irek S?onina
2004-02-06 12:49:51 UTC (about 20 years ago)

another prob with parasites and script-fu

On Fri, 6 Feb 2004, Sven Neumann wrote:

(parasite (list "gimp-comment" 1 "some comment"))

Uhm, what makes you think that you can construct a parsite using (list...)

I was thinking, that it is a simple list, I haven't found any *parasite-new or something like this function in pdb db browser. There is some other method to do this?

and why do you omit the data length?

like this: (parasite (list "gimp-comment" 1 14 "some comment")) ? because it makes an execution error when I'm trying to attach parasite with additional length field, value of length does not matter, the same with any other value, bigger or smaller.

This can hardly work
but I am afraid I cannot point you to a working example of using parasites from Script-Fu. I am not sure if this has ever been done successfully.

Ok, thanks... after all I can use ImageMagick to add a comment.

br.

Sven Neumann
2004-02-06 13:23:38 UTC (about 20 years ago)

another prob with parasites and script-fu

Hi,

Irek S?onina writes:

Uhm, what makes you think that you can construct a parsite using (list...)

I was thinking, that it is a simple list, I haven't found any *parasite-new or something like this function in pdb db browser. There is some other method to do this?

Did you look at the bug report I pointed you to recently? It has some example code that might work.

Sven