ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: yufeng.zhou on May 10, 2021, 12:15:55 AM

Title: GIF comment tag is not writable
Post by: yufeng.zhou on May 10, 2021, 12:15:55 AM
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
Title: Re: GIF comment tag is not writable
Post by: StarGeek on May 10, 2021, 12:36:27 AM
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
Title: Re: GIF comment tag is not writable
Post by: yufeng.zhou on May 10, 2021, 12:51:41 AM
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
Title: Re: GIF comment tag is not writable
Post by: yufeng.zhou on May 10, 2021, 03:11:18 AM
OS is Linux. The exiftool version is 11.99.
Title: Re: GIF comment tag is not writable
Post by: Phil Harvey on May 10, 2021, 07:35:21 AM
Like StarGeek says, the GIF Comment is in the File group.

- Phil
Title: Re: GIF comment tag is not writable
Post by: yufeng.zhou on May 12, 2021, 06:45:22 PM
Thanks Phil and StarGeek for the help.