34.26 Photo Metadata

20220116

Metadata is stored for photos within the image file and can be displayed with some image viewing apps. jpg images have EXIF (exchangeable image file format) formatted metadata. gif images do not have EXIF data but do have metadata though supporting comment tags and embedded XMP metadata/tags. See Section 34.31 to remove potentially private data from a photo.

The exiftool command provides access to image meta data.

$ exiftool photo.gif
ExifTool Version Number         : 10.80
File Name                       : photo.gif
Directory                       : .
File Size                       : 2028 kB
[...]
File Type                       : GIF
File Type Extension             : gif
MIME Type                       : image/gif
GIF Version                     : 89a
Image Width                     : 640
Image Height                    : 480
Frame Count                     : 11
Duration                        : 1.65 s
[...]
Frame Count                     : 11
Duration                        : 1.65 s
Image Size                      : 640x480
Megapixels                      : 0.307

We can modify the EXIF data using exiftool. Here we add a Date to a gif image:

$ exiftool -Date="2019:02:14 12:30:30.0713" photo.gif 

$ exiftool photo.gif
ExifTool Version Number         : 10.80
File Name                       : photo.gif
Directory                       : .
File Size                       : 2028 kB
[...]
File Type                       : GIF
File Type Extension             : gif
MIME Type                       : image/gif
GIF Version                     : 89a
Image Width                     : 640
Image Height                    : 480
[...]
Date                            : 2019:02:14 12:30:30.0713
[...]
Frame Count                     : 11
Duration                        : 1.65 s
Image Size                      : 640x480
Megapixels                      : 0.307


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0