ExifStripper

Dependency-free utilities for working with EXIF and related metadata.

Currently provides:

Installation

The package can be installed by adding exif_stripper to your list of dependencies in mix.exs:

def deps do
  [
    {:exif_stripper, "~> 0.1.3"}
  ]
end

Usage

Strip GPS metadata in-place (returns :ok, :noop or {:error, reason}):

ExifStripper.GpsStripper.strip_gps_data("/tmp/in.jpg", "/tmp/in.jpg")

Malformed metadata returns an error and leaves the output unchanged. When input and output are the same file, JPEG, WebP, HEIC and TIFF files are patched in place (through symlinks and hard links). PNG files and other outputs are written to a temporary file next to the output, which then replaces the output path.

Read a description:

ExifStripper.Description.read_file("/tmp/image.jpg", max_length: 500)

Tests

The test suite uses exiftool as an oracle, so exiftool must be available in PATH.