Simple image metadata scrubber. Will remove EXIF, XMP and IPTC metadata.

Overview

exiftool-rs

Simple image metadata scrubber. Will remove EXIF, XMP and IPTC metadata.

Packages

Usage

Jae Lo Presti
A small tool to scrub metadata from images.

USAGE:
    exiftool-rs [OPTIONS] 

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SWITCHES:
    -d, --directory    Scrub a whole directory (activator)
    -i, --inplace      Do not change the image name
    -r, --recursive    Recursive scrubbing

FILE:
        The image you want to apply the changes to

Logging

If you want to modify the logging level, set the RUST_LOG environment variable.

Compiling

git clone https://github.com/jae1911/exiftool-rs
cd exiftool-rs
cargo build -r

The program will be then be available in target/release/exiftool-rs

Benchmarks

Some benchmarks because everybody loves them.
Everything was tested on a Ryzen 7 3700x with 32GB of ram.

exiftool (Perl version)

$ sudo chrt -f 99 perf stat -ddd exiftool -v3 -overwrite_original -all='' base.jpg 2>&1 > /dev/null 

 Performance counter stats for 'exiftool -v3 -overwrite_original -all= base.jpg':

            108.19 msec task-clock                #    0.996 CPUs utilized          
                 0      context-switches          #    0.000 /sec                   
                 0      cpu-migrations            #    0.000 /sec                   
             5,963      page-faults               #   55.115 K/sec                  
       444,730,491      cycles                    #    4.111 GHz                      (28.92%)
        18,008,995      stalled-cycles-frontend   #    4.05% frontend cycles idle     (31.69%)
        43,509,390      stalled-cycles-backend    #    9.78% backend cycles idle      (34.47%)
       604,892,502      instructions              #    1.36  insn per cycle         
                                                  #    0.07  stalled cycles per insn  (37.24%)
       133,585,903      branches                  #    1.235 G/sec                    (40.01%)
         3,552,814      branch-misses             #    2.66% of all branches          (41.59%)
       285,062,290      L1-dcache-loads           #    2.635 G/sec                    (40.58%)
        12,138,954      L1-dcache-load-misses     #    4.26% of all L1-dcache accesses  (37.81%)
         LLC-loads                                                   
         LLC-load-misses                                             
       137,952,992      L1-icache-loads           #    1.275 G/sec                    (35.03%)
         2,939,284      L1-icache-load-misses     #    2.13% of all L1-icache accesses  (32.26%)
         2,013,636      dTLB-loads                #   18.612 M/sec                    (29.49%)
           144,403      dTLB-load-misses          #    7.17% of all dTLB cache accesses  (27.73%)
           643,638      iTLB-loads                #    5.949 M/sec                    (27.73%)
             9,805      iTLB-load-misses          #    1.52% of all iTLB cache accesses  (27.73%)
        13,447,839      L1-dcache-prefetches      #  124.295 M/sec                    (27.73%)
         L1-dcache-prefetch-misses                                   

       0.108629192 seconds time elapsed

       0.098442000 seconds user
       0.010183000 seconds sys

mat2

$ sudo chrt -f 99 perf stat -ddd mat2 --inplace -V base.jpg
DEBUG: Cleaning base.jpg…

 Performance counter stats for 'mat2 --inplace -V base.jpg':

            105.55 msec task-clock                #    0.980 CPUs utilized          
                21      context-switches          #  198.958 /sec                   
                 0      cpu-migrations            #    0.000 /sec                   
             9,414      page-faults               #   89.190 K/sec                  
       419,503,063      cycles                    #    3.974 GHz                      (43.43%)
        47,206,812      stalled-cycles-frontend   #   11.25% frontend cycles idle     (40.00%)
       120,228,136      stalled-cycles-backend    #   28.66% backend cycles idle      (35.12%)
       541,992,518      instructions              #    1.29  insn per cycle         
                                                  #    0.22  stalled cycles per insn  (33.06%)
       112,718,354      branches                  #    1.068 G/sec                    (31.96%)
         3,916,087      branch-misses             #    3.47% of all branches          (29.28%)
       260,983,861      L1-dcache-loads           #    2.473 G/sec                    (31.91%)
        14,862,648      L1-dcache-load-misses     #    5.69% of all L1-dcache accesses  (32.01%)
         LLC-loads                                                   
         LLC-load-misses                                             
       100,939,097      L1-icache-loads           #  956.317 M/sec                    (32.15%)
         1,260,732      L1-icache-load-misses     #    1.25% of all L1-icache accesses  (31.81%)
         4,296,617      dTLB-loads                #   40.707 M/sec                    (31.81%)
           282,793      dTLB-load-misses          #    6.58% of all dTLB cache accesses  (35.06%)
           496,595      iTLB-loads                #    4.705 M/sec                    (38.30%)
            20,134      iTLB-load-misses          #    4.05% of all iTLB cache accesses  (39.95%)
        10,456,775      L1-dcache-prefetches      #   99.070 M/sec                    (40.89%)
         L1-dcache-prefetch-misses                                   

       0.107734521 seconds time elapsed

       0.070084000 seconds user
       0.039753000 seconds sys

exiftool-rs

L1-dcache-load-misses (0.00%) LLC-loads LLC-load-misses L1-icache-loads (0.00%) L1-icache-load-misses (0.00%) dTLB-loads (0.00%) dTLB-load-misses (0.00%) iTLB-loads (0.00%) iTLB-load-misses (0.00%) L1-dcache-prefetches (0.00%) L1-dcache-prefetch-misses 0.005423761 seconds time elapsed 0.005444000 seconds user 0.000000000 seconds sys Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog">
$ sudo chrt -f 99 perf stat -ddd exiftool-rs -i base.jpg   
> Found a path base.jpg, processing!


> Attempting to clean...

> EXIF data found!

> Cleared all EXIF data!

> XMP data found!

> Cleared all XMP data!

> No IPTC data found (or not supported)

> Saving modified image to "base.jpg"

 Performance counter stats for 'exiftool-rs -i base.jpg':

              5.11 msec task-clock                #    0.941 CPUs utilized          
                 0      context-switches          #    0.000 /sec                   
                 0      cpu-migrations            #    0.000 /sec                   
               649      page-faults               #  127.111 K/sec                  
        21,154,087      cycles                    #    4.143 GHz                      (18.98%)
         1,877,017      stalled-cycles-frontend   #    8.87% frontend cycles idle     (77.69%)
         6,297,158      stalled-cycles-backend    #   29.77% backend cycles idle    
        25,747,365      instructions              #    1.22  insn per cycle         
                                                  #    0.24  stalled cycles per insn
         4,911,235      branches                  #  961.898 M/sec                  
           120,902      branch-misses             #    2.46% of all branches          (81.02%)
        12,393,053      L1-dcache-loads           #    2.427 G/sec                    (22.31%)
           L1-dcache-load-misses                                         (0.00%)
         LLC-loads                                                   
         LLC-load-misses                                             
           L1-icache-loads                                               (0.00%)
           L1-icache-load-misses                                         (0.00%)
           dTLB-loads                                                    (0.00%)
           dTLB-load-misses                                              (0.00%)
           iTLB-loads                                                    (0.00%)
           iTLB-load-misses                                              (0.00%)
           L1-dcache-prefetches                                          (0.00%)
         L1-dcache-prefetch-misses                                   

       0.005423761 seconds time elapsed

       0.005444000 seconds user
       0.000000000 seconds sys


Some events weren't counted. Try disabling the NMI watchdog:
    echo 0 > /proc/sys/kernel/nmi_watchdog
    perf stat ...
    echo 1 > /proc/sys/kernel/nmi_watchdog

As you can see, exiftool-rs is faster than mat2 and exiftool (Perl) according to this very professional benchmark.
Sample EXIF file was taken from ianare/exif-samples.

You might also like...
Image processing operations

imageproc An image processing library, based on the image library. There may initially be overlap between the functions in this library and those in i

Image Compression Algorithm
Image Compression Algorithm

Image Compression Algorithm 🦭 A new lossless image compression algorithm. In the newest version the algorithm performs rather good, but manages to su

tai (Terminal Ascii Image) tool to convert images to ascii written in Rust
tai (Terminal Ascii Image) tool to convert images to ascii written in Rust

TAI Terminal Ascii Image A tool to convert images to ascii art written in Rust 🦀 Notes This tool is still in development stage. Contributions All Con

Artsy pixel image to vector graphics converter
Artsy pixel image to vector graphics converter

inkdrop inkdrop is an artsy bitmap to vector converter. Command line interface The CLI binary is called inkdrop-cli and reads almost any image bitmap

Automated image compression for efficiently distributing images on the web.

Imager Apparently this project made it into the GitHub Archive Program. About Imager is a tool for automated image compression, and can competitively

Open Graphic Image Writer
Open Graphic Image Writer

Open Graphic Image Writer Documentation You can generate Open Graphic Image dynamically. A CSS-like API. You can generate image by using template imag

Rust library for fast image resizing with using of SIMD instructions.

fast_image_resize Rust library for fast image resizing with using of SIMD instructions. CHANGELOG Supported pixel formats and available optimisations:

Experimental vectorized-raster image editor

Sverg Sverg is an experimental image editor that leverages the power of modern hardware so that you can create images as if they were raster images (e

Rust port of the Quite Okay Image format

qoi_rs What is this? A pretty boring Rust translation of qoi. Status What's there Encode & Decode works Results agree with the C implementation for al

Releases(0.1.0)
Owner
Jae Lo Presti
She/Her btw.
Jae Lo Presti
Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes

What is Lust? Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes with scaling in mind.

Harrison Burt 242 Dec 22, 2022
Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

3top1a 4 Apr 9, 2022
A simple command-line utility (and Rust crate!) for converting from a conventional image file (e.g. a PNG file) into a pixel-art version constructed with emoji

EmojiPix This is a simple command-line utility (and Rust crate!) for converting from a conventional image file (e.g. a PNG file) into a pixel-art vers

Michael Milton 22 Dec 6, 2022
A simple image average color extractor written in 🦀 Rust

A simple image average color extractor written in ?? Rust

Victor Aremu 3 Sep 23, 2021
A Simple Image to Ascii converter in Rust

Image to Ascii A Simple Image to Ascii converter in Rust Brief ?? In my way to learn Rust i decided to make this converter. Challenges ?? new to Rust

WasixXD 7 Sep 16, 2022
Simple image resizer/cropper API

Simple image resizer/cropper API. This is a Rust ?? port of the following article on the Deno Blog: Build a Simple Image Resizing API in less than 100

Enrique Mejías 5 Mar 2, 2023
Signed distance field font and image command line tool based on OpenCL.

SDFTool Signed distance field font and image command line tool based on OpenCL. Build Windows Run cargo build --release in Visual Studio developer x64

弦语蝶梦 7 Oct 16, 2022
Rust library to get image size and format without loading/decoding

imageinfo-rs Rust library to get image size and format without loading/decoding. The imageinfo don't get image format by file ext name, but infer by f

xiaozhuai, Weihang Ding 47 Dec 30, 2022
Image processing proxy and API, created to allow faster media delivery for the Holaplex storefront.

Description imgopt is an image processing proxy with a very simple API, created to download and dynamically scaledown, convert, and cache different me

Holaplex 5 Nov 3, 2022
Fastest image quadtree stylization implementation to date, capable of hundreds of fps and avoiding ugly non-squares.

Quadim Fastest image quadtree stylization implementation to date, capable of hundreds of fps and avoiding ugly non-squares. 简体中文 如果你是从B站来的…… “Listen t

K--A______ 13 May 11, 2023