__doctype__ __header1__ __sidebar1__
__maintitle__

Example 2: addmoddel.cpp

Sample usage of high-level Exiv2 library calls to add, modify and delete Exif metadata.

__example2__

Here is the image with the Exif metadata from this example

Image containing the Exif metadata from example 2

Using the print function from Example1 shows the following Exif tags in the image. Note the tag Exif.Image.ExifTag: It is required by the Exif standard because the metadata contains an Exif.Photo.* tag and is automatically added by Exiv2 to ensure that the Exif structure is valid.

$ exifprint img_2158.jpg
Exif.Image.Model                             0x0110 Ascii       7  Test 1
Exif.Image.SamplesPerPixel                   0x0115 Short       1  162
Exif.Image.XResolution                       0x011a SLong       1  -2
Exif.Image.YResolution                       0x011b SRational   1  -2/3
Exif.Image.ExifTag                           0x8769 Long        1  89
Exif.Photo.DateTimeOriginal                  0x9003 Ascii      20  2000:12:31 23:59:59
__footer__
__tracker__