anaglyph

Crates.ioanaglyph
lib.rsanaglyph
version0.1.1
sourcesrc
created_at2023-09-19 16:01:42.557037
updated_at2023-09-19 16:14:50.155902
descriptionAn anaglyph maker
homepage
repositoryhttps://github.com/Coddeus/anaglyph
max_upload_size
id977019
size8,411,646
CoDeus (Coddeus)

documentation

https://docs.rs/anaglyph

README

Anaglyph

This crate produces anaglyphs from any image decodable with the image crate.
Choose your input image, the output filename, the horizontal/vertical offsets between the two colors, and the two colors.
The output color couples are the ones listed here.

License: MIT OR Apache-2.0

Example usage:

With this (awesome) sample image, by Bao Menglong on Unsplash:

And this code:

create("bao-menglong-unsplash.jpg", "output_bottomright.png", 100, 20, Coloring::RedCyan);
create("bao-menglong-unsplash.jpg", "output_topright.png", 70, -14, Coloring::RedGreen);
create("bao-menglong-unsplash.jpg", "output_bottomleft.png", -30, 8, Coloring::Anachrome);
create("bao-menglong-unsplash.jpg", "output_topleft.png", -10, -2, Coloring::Trioscopic);

Results (put on your /🟥∧🟦\ glasses):

output_bottomright.png:

output_topright.png:

output_bottomleft.png:

output_topleft.png:

Commit count: 5

cargo fmt