picturium_libvips/
options.rs1use crate::enums::{VipsAccess, VipsIntent, VipsInterpretation, VipsPCS, VipsForeignFlags};
2use crate::VipsFailOn;
3
4#[derive(Debug)]
5pub struct FromFileOptions {
6 pub access: VipsAccess,
7 pub memory: bool
8}
9
10impl Default for FromFileOptions {
11 fn default() -> Self {
12 Self {
13 access: VipsAccess::default(),
14 memory: true
15 }
16 }
17}
18
19#[derive(Debug)]
20pub struct FromSvgOptions {
21 pub dpi: f64,
22 pub scale: f64,
23 pub unlimited: bool,
24 pub flags: VipsForeignFlags,
25 pub memory: bool,
26 pub access: VipsAccess,
27 pub fail_on: VipsFailOn,
28 pub revalidate: bool
29}
30
31impl Default for FromSvgOptions {
32 fn default() -> Self {
33 Self {
34 dpi: 72.0,
35 scale: 1.0,
36 unlimited: false,
37 flags: VipsForeignFlags::default(),
38 memory: false,
39 access: VipsAccess::default(),
40 fail_on: VipsFailOn::default(),
41 revalidate: false,
42 }
43 }
44}
45
46#[derive(Debug)]
47pub struct IccTransformOptions {
48 pub pcs: VipsPCS,
49 pub intent: VipsIntent,
50 pub black_point_compensation: bool,
51 pub embedded: bool,
52 pub input_profile: String,
53 pub depth: i32
54}
55
56impl Default for IccTransformOptions {
57 fn default() -> Self {
58 Self {
59 pcs: VipsPCS::default(),
60 intent: VipsIntent::default(),
61 black_point_compensation: false,
62 embedded: false,
63 input_profile: "sRGB".into(),
64 depth: 8
65 }
66 }
67}
68
69#[derive(Debug)]
70pub struct Composite2Options {
71 pub compositing_space: VipsInterpretation,
72 pub premultiplied: bool,
73 pub x: i32,
74 pub y: i32
75}
76
77impl Default for Composite2Options {
78 fn default() -> Self {
79 Self {
80 compositing_space: VipsInterpretation::default(),
81 premultiplied: false,
82 x: 0,
83 y: 0
84 }
85 }
86}