1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Image resizing and format conversion utilities.
//!
//! This crate provides high-performance image resizing with support for multiple backends
//! and output formats. It offers both synchronous and asynchronous APIs for image manipulation.
//!
//! # Backends
//!
//! * `libvips` - High-performance image processing using libvips (not available on Windows)
//! * `image` - Pure Rust image processing using the `image` crate
//!
//! # Supported Formats
//!
//! * JPEG - Lossy compression with configurable quality
//! * WebP - Modern image format with better compression
//!
//! # Features
//!
//! * `libvips` - Enable libvips backend for high-performance processing
//! * `image` - Enable pure Rust image backend
//!
//! # Examples
//!
//! ```rust,no_run
//! # #[cfg(feature = "image")]
//! # {
//! # use moosicbox_image::Encoding;
//! use moosicbox_image::image::try_resize_local_file;
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Resize an image to 800x600 JPEG with quality 85
//! let resized = try_resize_local_file(
//! 800,
//! 600,
//! "/path/to/image.jpg",
//! Encoding::Jpeg,
//! 85,
//! )?;
//! # Ok(())
//! # }
//! # }
//! ```
use ;
/// Image manipulation utilities using the `image` crate.
/// Image manipulation utilities using `libvips`.
/// Image encoding format.