Skip to content

A small Rust script to convert circular anamorphic images into horizontal images.

License

Notifications You must be signed in to change notification settings

leifgehrmann/anamorph-to-panorama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

anamorph-to-panorama

A small Rust script to convert circular anamorphic images into horizontal images.

Example

Input Image: Explanation of the view of Paris, created in 1814 (Museum Number: 1886,0111.23.13). From the British Museum, licensed under CC BY-NC-SA 4.0.

A very old print from the 1800s displaying a circular graphic, typical of anamorphic visuals. The graphic is a landscape picture of Paris.

Executed command:

./target/debug/anamorph-to-panorama ./input.jpg ./output-panorama.jpg 1730 1825 813 1925

Output Image:

A transformed image of the previous image, except instead of a circular design, it is horizontal, and very long.

Close up:

A close up of the previous image.

Build

Assuming Rust is installed:

cargo build

Usage

./target/debug/anamorph-to-panorama [INPUT_FILE] [OUTPUT_FILE] [center X] [center Y] [inner diameter] [outer diameter]

Explanation

Below is a visual explanation of how the script works. It converts a 🍩 into a 🥖.

A visual explanation of how the script works, converting a donut shape into a long-rectangle shape.

About

A small Rust script to convert circular anamorphic images into horizontal images.

Topics

Resources

License

Stars

Watchers

Forks