8 releases
new 0.1.7 | Apr 15, 2024 |
---|---|
0.1.6 | Apr 8, 2024 |
0.1.3 | Mar 30, 2024 |
#146 in Images
773 downloads per month
115KB
1K
SLoC
Respicta - Image Resizer
Respicta is a versatile project offering a library, command-line interface (CLI), and web service for resizing images and changing their formats seamlessly.
Features
Resize Images: Effortlessly resize images to desired dimensions.
Change Format: Convert images to different formats such as JPEG, PNG, etc.
CLI: Intuitive command-line interface for quick resizing and format conversion.
Web Service: Host a web service to resize images on-the-fly.
Supported conversions
- Gif to WebP
- Jpeg to WebP
- Png to Jpeg
- Png to WebP
Convert
docker run --rm -v ./:/images rayros/respicta convert --help
Convert images from one format to another
Usage: image-resizer convert [OPTIONS] <INPUT_PATH> <OUTPUT_PATH>
Arguments:
<INPUT_PATH> Input image path
<OUTPUT_PATH> Output image path
Options:
--help
-w, --width <WIDTH> Width of the output image If not set, the width will be the same as the input image
-h, --height <HEIGHT> Height of the output image If not set, the height will be the same as the input image
Examples:
image-resizer convert --width 100 --height 100 input.jpg output.jpg
Server
docker run --rm rayros/respicta server --help
Start a server to convert images
Usage: respicta server [OPTIONS]
Options:
-a, --address <ADDRESS> Address to bind the server to (default: 0.0.0.0:3000)
-l, --limit <LIMIT> Maximum file size in bytes (default: 10MB)
-h, --help Print help
As a library
use respicta::convert;
fn main() {
convert(&respicta::Config {
input_path: &"images/logo.jpeg".into(),
output_path: &"images/logo_small.jpeg".into(),
width: Some(200),
height: Some(200),
})
.unwrap();
}
Program utilized in:
Dependencies
~20–35MB
~385K SLoC