| Crates.io | seamcarving |
| lib.rs | seamcarving |
| version | 0.2.3 |
| created_at | 2019-07-05 20:28:51.579306+00 |
| updated_at | 2020-04-19 22:34:19.977138+00 |
| description | Content-aware image resizing using the seam carving algorithm. Allows changing the aspect ratio of an image without distorting its contents. |
| homepage | https://github.com/lovasoa/seamcarving#seamcarving |
| repository | https://github.com/lovasoa/seamcarving.git |
| max_upload_size | |
| id | 146627 |
| size | 1,479,164 |
A rust library for content-aware image resizing using seam carving.
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 = image::open("input.jpg")?;
let (width, height) = img.dimensions();
let resized = seamcarving::resize(&img, width/2, height);
resized.save("resized.jpg")?;
| Original | Resized |
|---|---|
![]() |
![]() |
![]() |
![]() |