#heic #jpeg #iso-bmff #exif

kapy-exif

A minimal library that extracts and replaces EXIF for images

5 releases

0.2.1 Jan 9, 2026
0.2.0 May 3, 2025
0.1.2 May 2, 2025
0.1.1 May 1, 2025
0.1.0 Apr 30, 2025

#538 in Images


Used in kapy-lite

MIT license

83KB
2K SLoC

kapy-exif

This is a simple library that extracts and replaces EXIF data in an image file. It focuses on the minimal functionalities required by the Kapy application, and therefore, it might be difficult to use for general purposes.

The functionalities this library focuses on are as follows:

  • Extracting raw EXIF data from an image (currently, JPEG and HEIC images are supported)
  • Adding or replacing raw EXIF data for an image (with 'exiv2' feature)

Build

This section describes how to build the crate with 'exiv2' feature. This feature is required to manipulate(get tag, update GPS info) EXIF data.

If you don't need to manipulate EXIF data, you can build the crate without the 'exiv2' feature. In this case, you do not need to follow the instructions below.

Build on macOS

If you use Homebrew (https://brew.sh/), you can easily install the required packages.
After installing Homebrew, you can install the required packages and build the application by running the following command:

$ brew install pkg-config exiv2
$ cargo build --features=exiv2

If you are not using Homebrew, please install the required packages below and set the corresponding environment variables accordingly:

Build on Windows

Pre-requirements

Build

> set EXIV2_INCLUDE_DIRS={YOUR_EXIV2_INCLUDE_DIR}
> set EXIV2_LIB_DIRS={YOUR_EXIV_LIB_DIR}
> set LIBCLANG_PATH={YOUR_LLVM_BIN_DIR}
> cargo build --features=exiv2

Dependencies

~3.5–5MB
~84K SLoC