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
//! Helper functions to get compute stats on images
//!
use crateOxenError;
use crateMetadataImage;
// use magick_rust::{magick_wand_genesis, MagickWand};
use Path;
// use std::sync::Once;
// static START: Once = Once::new();
/// Detects the image metadata for the given file.
// fn magick_to_oxen_colorspace(wand: &MagickWand) -> ImgColorSpace {
// let colorspace = wand.get_image_colorspace();
// match colorspace {
// magick_rust::bindings::ColorspaceType_RGBColorspace
// | magick_rust::bindings::ColorspaceType_sRGBColorspace => {
// if wand.get_image_alpha_channel() {
// ImgColorSpace::RGBA
// } else {
// ImgColorSpace::RGB
// }
// }
// magick_rust::bindings::ColorspaceType_GRAYColorspace => ImgColorSpace::Grayscale,
// _ => ImgColorSpace::Unknown,
// }
// }