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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! Rust bindings for LibRaw - library for reading RAW image files
//!
//! This crate provides safe Rust bindings to the LibRaw C++ library,
//! which is used for reading RAW files from digital cameras.
// Public exports
pub use ;
pub use ;
pub use ;
/// Convenience function to extract thumbnail from a RAW file path
///
/// This is a shorthand for `RawProcessor::extract_thumbnail(path)`
///
/// # Arguments
///
/// * `path` - Path to the RAW file
///
/// # Returns
///
/// Returns the thumbnail image data as a byte vector (typically JPEG format)
///
/// # Example
///
/// ```no_run
/// use rawlib::extract_thumbnail;
///
/// let thumb_bytes = extract_thumbnail("photo.cr2").unwrap();
/// std::fs::write("thumbnail.jpg", &thumb_bytes).unwrap();
/// ```
/// Convenience function to extract thumbnail with metadata
///
/// Similar to `extract_thumbnail` but returns full `ThumbnailData`
/// with format information and dimensions
///
/// # Arguments
///
/// * `path` - Path to the RAW file
///
/// # Returns
///
/// Returns `ThumbnailData` with image format, dimensions, and raw bytes
///
/// # Example
///
/// ```no_run
/// use rawlib::extract_thumbnail_with_info;
///
/// let thumb = extract_thumbnail_with_info("photo.nef").unwrap();
/// println!("Format: {:?}, Size: {}x{}", thumb.format, thumb.width, thumb.height);
/// std::fs::write("thumbnail.jpg", &thumb.data).unwrap();
/// ```