Crates.io | imgcore |
lib.rs | imgcore |
version | 0.1.3 |
source | src |
created_at | 2024-10-30 12:51:31.89879 |
updated_at | 2024-11-21 01:20:48.689404 |
description | A beginner-friendly, lightweight Rust library for basic image manipulation. |
homepage | |
repository | |
max_upload_size | |
id | 1428474 |
size | 3,355 |
ImgCore is a beginner-friendly, lightweight Rust library for performing basic image manipulations, like resizing, cropping, and saving images, without the complexity of larger image processing libraries.
Add imgcore to your Cargo.toml
:
[dependencies]
imgcore = "0.1.0"
Here's a quick example of how to load an image, resize it, and save the result:
use imgcore::ImgCore;
use image::ImageFormat;
fn main() {
// Load an image from a file
let mut img = ImgCore::load("path/to/image.png").expect("Failed to load image");
// Resize the image to 200x200 pixels
img.resize(200, 200);
// Save the resized image
img.save("path/to/resized_image.png", ImageFormat::Png)
.expect("Failed to save image");
}
This project is licensed under the MIT License
bensatlantik