GIF comment tag is not writable

Started by yufeng.zhou, May 10, 2021, 12:15:55 AM

Previous topic - Next topic

yufeng.zhou

Hi,

I am trying to write to GIF:Comment tag.

It says in https://exiftool.org/TagNames/GIF.html that the Comment tag is writable. And exiftool -listw -GIF:all tells the same
Writable GIF tags:
  Comment ICC_Profile XMP


However if I run exiftool -GIF:Comment='gif comment'  *.gif, I get
Warning: Sorry, GIF:Comment doesn't exist or isn't writable
Nothing to do.


Is this expected?

Sample GIF that I tested with is attached.

Thanks in advance.

Kind regards,
Yufeng

StarGeek

#1
Use just Comment.  You'll see it shows up int the File group
C:\>exiftool -P -overwrite_original -comment="test comment" Y:\!temp\aaaa
    1 directories scanned
    1 image files updated

C:\>exiftool -g1 -a -s -e Y:\!temp\aaaa
======== Y:/!temp/aaaa/Gif 4.gif
---- ExifTool ----
ExifToolVersion                 : 12.25
---- System ----
FileName                        : Gif 4.gif
Directory                       : Y:/!temp/aaaa
FileSize                        : 1593 KiB
FileModifyDate                  : 2021:05:09 21:31:56-07:00
FileAccessDate                  : 2021:05:09 21:32:32-07:00
FileCreateDate                  : 2021:05:09 21:31:54-07:00
FilePermissions                 : -rw-rw-rw-
---- File ----
FileType                        : GIF
FileTypeExtension               : gif
MIMEType                        : image/gif
Comment                         : test comment
---- GIF ----
GIFVersion                      : 89a
ImageWidth                      : 498
ImageHeight                     : 498
HasColorMap                     : No
ColorResolutionDepth            : 4
BitsPerPixel                    : 2
BackgroundColor                 : 240
AnimationIterations             : Infinite
FrameCount                      : 71
Duration                        : 7.10 s
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

yufeng.zhou

Hi,

Thanks for the prompt reply.

In our design the user can define the Group and the Tag for writing value into the specific tag. User is expecting to write value to GIF Comment tag because the tag document says it is doable. In general we just use command -<group>:<tag>=<value>. However, in this case do we need to add special handling when tag is Comment to use -Comment=<value> instead of -<group>:Comment=<value>?

And your suggested approach writes the value to File Comment tag instead of GIF Comment tag, so user is unable to see the value under the GIF group. Is there anything we can do about it?

Thank you again.

Kind regards,
Yufeng

yufeng.zhou

OS is Linux. The exiftool version is 11.99.

Phil Harvey

Like StarGeek says, the GIF Comment is in the File group.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

yufeng.zhou

Thanks Phil and StarGeek for the help.