09-26-2020, 10:29 AM
@Ofnuts - question about xcf format comment
This a shell using your two lines of code.
Using this on a png file (same with jpeg)
Files has default comment - new comment added using script - png exported - file closed - opened again - comment is there. https://i.imgur.com/6QvhWWr.mp4
Same procedure but using xcf format. The comment is not saved (or is it lost when the xcf is reopened?) Whichever way the comment has gone. https://i.imgur.com/QhoiZ67.mp4
This a shell using your two lines of code.
Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# adds a comment
import re, os, sys
from gimpfu import *
def add_comment (image,drawable,comment):
if not comment:
comment="no comment "
p=gimp.Parasite('gimp-comment',0,comment)
image.parasite_attach(p)
else:
p=gimp.Parasite('gimp-comment',0,comment)
image.parasite_attach(p)
register(
"python_fu_add_comment",
" ",
" ",
"",
" ",
"2020",
"<Image>/Tools/add comment",
"*",
[
(PF_TEXT, "comment", "new comment", "")
],
[],
add_comment,
)
main()
Using this on a png file (same with jpeg)
Files has default comment - new comment added using script - png exported - file closed - opened again - comment is there. https://i.imgur.com/6QvhWWr.mp4
Same procedure but using xcf format. The comment is not saved (or is it lost when the xcf is reopened?) Whichever way the comment has gone. https://i.imgur.com/QhoiZ67.mp4