| Crates.io | supermaker-ai-image-master-2 |
| lib.rs | supermaker-ai-image-master-2 |
| version | 66.0.38 |
| created_at | 2025-12-26 11:59:26.646477+00 |
| updated_at | 2025-12-26 11:59:26.646477+00 |
| description | High-quality integration for https://supermaker.ai/image/ |
| homepage | https://supermaker.ai/image/ |
| repository | https://github.com/qy-upup/supermaker-ai-image-master-2 |
| max_upload_size | |
| id | 2005631 |
| size | 10,127 |
A robust Rust crate for advanced image manipulation and processing tasks, designed for integration with AI-powered image workflows. It provides a set of utilities for image format conversion, resizing, and basic filtering.
Add the following line to your Cargo.toml file under the [dependencies] section:
toml
supermaker-ai-image-master-2 = "0.1.0" # Replace with the actual version
Here are a few examples demonstrating how to use supermaker-ai-image-master-2:
1. Converting an image to grayscale: rust use supermaker_ai_image_master_2::image_utils; use image::io::Reader as ImageReader; use std::path::Path;
fn main() -> Result<(), Box
// Convert the image to grayscale.
let grayscale_img = image_utils::to_grayscale(&img);
// Save the grayscale image to a new file.
grayscale_img.save("output_grayscale.png")?;
println!("Image converted to grayscale and saved as output_grayscale.png");
Ok(())
}
2. Resizing an image: rust use supermaker_ai_image_master_2::image_utils; use image::io::Reader as ImageReader; use image::imageops::FilterType;
fn main() -> Result<(), Box
// Resize the image to 500x500 pixels using Lanczos resampling.
let resized_img = image_utils::resize(&img, 500, 500, FilterType::Lanczos3);
// Save the resized image to a new file.
resized_img.save("output_resized.jpg")?;
println!("Image resized to 500x500 and saved as output_resized.jpg");
Ok(())
}
3. Applying a basic blur filter: rust use supermaker_ai_image_master_2::image_utils; use image::io::Reader as ImageReader;
fn main() -> Result<(), Box
// Apply a blur filter with a sigma of 2.0.
let blurred_img = image_utils::blur(&img, 2.0);
// Save the blurred image to a new file.
blurred_img.save("output_blurred.jpeg")?;
println!("Image blurred and saved as output_blurred.jpeg");
Ok(())
}
4. Converting to a specific image format: rust use supermaker_ai_image_master_2::image_utils; use image::io::Reader as ImageReader; use image::ImageFormat;
fn main() -> Result<(), Box
// Save the image as a JPEG.
image_utils::save_as(&img, "output.jpg", ImageFormat::Jpeg)?;
println!("Image saved as output.jpg");
Ok(())
}
5. Cropping an image: rust use supermaker_ai_image_master_2::image_utils; use image::io::Reader as ImageReader;
fn main() -> Result<(), Box
// Crop a 100x100 region from the top-left corner.
let cropped_img = image_utils::crop(&img, 0, 0, 100, 100);
// Save the cropped image.
cropped_img.save("output_cropped.png")?;
println!("Image cropped and saved as output_cropped.png");
Ok(())
}
MIT
This crate is part of the supermaker-ai-image-master-2 ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/image/