ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:03 AM

Title: XPComment tag malfunctionning
Post by: Archive on May 12, 2010, 08:54:03 AM
[Originally posted by linne345 on 2007-04-15 15:33:41-07]

I'm using exiftool v6.86 in a batch script from linux to add comments, using the "XPComment" tag.

This allows me to see comments in the file properties under windows as well.

Syntax :

exiftool -XPComment="This is a comment" filename.jpeg

This executes OK, but when I try to look at the properties of the files under windows, the first 2 characters of the comment are replaced by non-printable characters.  Only solution for me was to add two "space 0x20" characters before any of my comments - but this is dirty !

++++++++++++dump of the file generated by exiftool (comments not read correctly by WinXP)

Code:
00000000  ff d8 ff e0 00 10 4a 46  49 46 00 01 01 01 01 2c  |......JFIF.....,|
00000010  01 2c 00 00 ff e1 00 a2  45 78 69 66 00 00 4d 4d  |.,......Exif..MM|
00000020  00 2a 00 00 00 08 00 05  01 1a 00 05 00 00 00 01  |.*..............|
00000030  00 00 00 4a 01 1b 00 05  00 00 00 01 00 00 00 52  |...J...........R|
00000040  01 28 00 03 00 00 00 01  00 02 00 00 02 13 00 03  |.(..............|
00000050  00 00 00 01 00 01 00 00  9c 9c 00 01 00 00 00 40  |...............@|
00000060  00 00 00 5a 00 00 00 00  00 00 01 2c 00 00 00 01  |...Z.......,....|
00000070  00 00 01 2c 00 00 00 01  20 00 20 00 43 00 6f 00  |...,.... . .C.o.|
00000080  6d 00 6d 00 65 00 6e 00  74 00 61 00 69 00 72 00  |m.m.e.n.t.a.i.r.|
00000090  65 00 20 00 61 00 63 00  63 00 65 00 6e 00 74 00  |e. .a.c.c.e.n.t.|

+++++++++ dump of the file after correction under WinXP (edit manually file properties + Apply)

Code:
00000000  ff d8 ff e0 00 10 4a 46  49 46 00 01 01 01 01 2c  |......JFIF.....,|
00000010  01 2c 00 00 ff e1 00 9e  45 78 69 66 00 00 49 49  |.,......Exif..II|
00000020  2a 00 08 00 00 00 05 00  1a 01 05 00 01 00 00 00  |*...............|
00000030  4a 00 00 00 1b 01 05 00  01 00 00 00 52 00 00 00  |J...........R...|
00000040  28 01 03 00 01 00 00 00  02 00 00 00 13 02 03 00  |(...............|
00000050  01 00 00 00 01 00 00 00  9c 9c 01 00 3c 00 00 00  |............<...|
00000060  5a 00 00 00 00 00 00 00  2c 01 00 00 01 00 00 00  |Z.......,.......|
00000070  2c 01 00 00 01 00 00 00  43 00 6f 00 6d 00 6d 00  |,.......C.o.m.m.|
00000080  65 00 6e 00 74 00 61 00  69 00 72 00 65 00 20 00  |e.n.t.a.i.r.e. .|
00000090  61 00 63 00 63 00 65 00  6e 00 74 00 75 00 e9 00  |a.c.c.e.n.t.u...|
000000a0  20 00 64 00 65 00 20 00  4c 00 69 00 6e 00 75 00  | .d.e. .L.i.n.u.|

Anybody has a way to use XPComment tag, without the "garbage" characters ?
Ask me if you need a sample full file.
Title: Re: XPComment tag malfunctionning
Post by: Archive on May 12, 2010, 08:54:03 AM
[Originally posted by exiftool on 2007-04-15 15:58:32-07]

Wow.  That is scary.  I wouldn't use XP to edit meta
information if I was you -- it changed byte ordering
of the EXIF.  This is a dangerous and stupid thing to
do.

But more on topic:  I dragged out my PC to test this out
myself and can't reproduce your problem under Windows XP
using a big endian ("MM" byte order) image as you did.
(XP does change byte order when I write something though,
I confirmed that -- monumental stupidity).

So perhaps there is something specific with your file.
If you can email it to me I will test it here.
(philharvey66 at gmail.com)

Thanks.

- Phil