2 releases
0.1.1 | Sep 19, 2023 |
---|---|
0.1.0 | Sep 19, 2023 |
#805 in Images
33 downloads per month
8MB
147 lines
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:
Dependencies
~5MB
~63K SLoC