From the course: Code Clinic: Clojure

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Parsing EXIF data

Parsing EXIF data - Clojure Tutorial

From the course: Code Clinic: Clojure

Start my 1-month free trial

Parsing EXIF data

- [Instructor] In this video, we'll implement the image file metadata extraction procedures by looking at their EXIF data. We have IntelliJ open, let's open our start folder for this project. I'll go to Desktop, and then Exercise Files, Chapter 5, and the start folder, click OK. Now I have the project open in the tree over here, I'll look in the source folder, image_meta, and then double-click exif.clj. First we'll need to define our namespace, so I'll call it image-meta.exif. Now for our require expression, I'll require clojure.java.io, I'll alias it to io, and we'll use this for file operations. Next I'll make an import expression and we'll need to import the Java library we're working with which is the metadata extractor. I'll pull that in from com.drew.imaging and from there I'll need this class ImageMetadataReader, and the exception, ImageProcessingException. For our first function, I'd like to implement a function that takes a file name, and returns the exif data as a map of…

Contents