imgcore

Crates.ioimgcore
lib.rsimgcore
version0.1.3
sourcesrc
created_at2024-10-30 12:51:31.89879
updated_at2024-11-21 01:20:48.689404
descriptionA beginner-friendly, lightweight Rust library for basic image manipulation.
homepage
repository
max_upload_size
id1428474
size3,355
Ben Santora (bensatlantik)

documentation

README

imgcore

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.

Features

  • Load and save images in common formats (PNG, JPEG, etc.)
  • Resize images to specified dimensions
  • Crop a rectangular region from an image

Installation

Add imgcore to your Cargo.toml:

[dependencies]
imgcore = "0.1.0"

Usage

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");
}

License

This project is licensed under the MIT License

Author

bensatlantik

Commit count: 0

cargo fmt