seamcarving
A rust library for content-aware image resizing using seam carving.
How to use
Open an image using the image crate,
then use the resize
function from this create to create a smaller version
of the image, while preserving its contents.
let img = open?;
let = img.dimensions;
let resized = resize;
resized.save?;
Detailed code example
- resize.rs : command-line image resizing
Results
Original | Resized |
---|---|