Skip to content

FLMNH-MGCL/imageconverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image Converter

DOI

Converts images from CR2 to JPG formats. Developed for the McGuire Center for Lepidoptera at the Florida Museum of Natural History.

Given starting and destination paths, the program will collect and convert .CR2 files to .JPG. magick_rust, a wrapper around ImageMagick, will be attempted first, falling back on imagepipe. Support for other file conversions is possible, but will not be implemented until the Museum's needs require it.

Installation and Usage

Be sure to install Rust and ImageMagick on your system. When installing ImageMagick on a Windows computer, please ensure you check the checkbox "Install development headers and libraries for C and C++".

You may run the program with cargo:

$ cargo run --release -- --help
$ cargo run --release -- [options] [flags]

Alternatively, you may build an executable and run that directly:

-- linux / macos --
$ cargo build --release
$ ./target/release/imageconverter [options] [flags]

-- windows --
$ cargo build --release
$ .\target\release\imageconverter.exe [options] [flags]

Benchmarks

magick_rust conversions average 40s for Hi-Resolution CR2 files, while imagepipe conversions average 90s for the same files. As such, the order is magick -> imagepipe.

rayon is used to expedite the overall conversion times, offloading the conversions to separate threads in parallel execution.