In this section, we review how to extract EXIF metadata from images with the PIL module.
Extracting metadata from images
Introduction to Exif and the PIL module
One of the main modules that we find within Python for the processing and manipulation of images is PIL. The PIL module allows us to extract the metadata of images in EXIF.
Exif (Exchange Image File Format) is a specification that indicates the rules that must be followed when we are going to save images and defines how to store metadata in image and audio files. This specification is applied today in most mobile devices and digital cameras.
The PIL.ExifTags module allows us to extract information from these tags:
We can see the official documentation for the exiftags...