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 package inside the pillow module ...

Get Mastering Python for Networking and Security now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.