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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
use std::mem;
use crate::ffi;
#[repr(C)]
#[derive(Eq,PartialEq,Clone,Copy,Debug)]
pub enum Format {
UNKNOWN = -1,
BMP = 0,
ICO = 1,
JPEG = 2,
JNG = 3,
KOALA = 4,
IFF = 5,
MNG = 6,
PBM = 7,
PBMRAW = 8,
PCD = 9,
PCX = 10,
PGM = 11,
PGMRAW = 12,
PNG = 13,
PPM = 14,
PPMRAW = 15,
RAS = 16,
TARGA = 17,
TIFF = 18,
WBMP = 19,
PSD = 20,
CUT = 21,
XBM = 22,
XPM = 23,
DDS = 24,
GIF = 25,
HDR = 26,
FAXG3 = 27,
SGI = 28,
EXR = 29,
J2K = 30,
JP2 = 31,
PFM = 32,
PICT = 33,
RAW = 34
}
impl From<i32> for Format {
fn from(n: i32) -> Format {
unsafe{ mem::transmute(n) }
}
}
#[repr(i32)]
#[derive(Eq,PartialEq,Clone,Copy,Debug)]
pub enum ColorChannel {
RGB = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_RGB,
RED = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_RED,
GREEN = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_GREEN,
BLUE = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_BLUE,
ALPHA = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_ALPHA,
BLACK = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_BLACK,
REAL = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_REAL,
IMAG = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_IMAG,
MAG = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_MAG,
PHASE = ffi::FREE_IMAGE_COLOR_CHANNEL_FICC_PHASE,
}
pub static DEFAULT:i32 = 0;
pub static BMP_SAVE_RLE:i32=1;
pub static EXR_FLOAT:i32=0x0001;
pub static EXR_NONE:i32=0x0002;
pub static EXR_ZIP:i32=0x0004;
pub static EXR_PIZ:i32=0x0008;
pub static EXR_PXR24:i32=0x0010;
pub static EXR_B44:i32=0x0020;
pub static EXR_LC:i32=0x0040;
pub static JPEG_QUALITYSUPERB:i32=0x80;
pub static JPEG_QUALITYGOOD:i32=0x0100;
pub static JPEG_QUALITYNORMAL:i32=0x0200;
pub static JPEG_QUALITYAVERAGE:i32=0x0400;
pub static JPEG_QUALITYBAD:i32=0x0800;
pub static JPEG_PROGRESSIVE:i32=0x2000;
pub static JPEG_SUBSAMPLING_411:i32=0x1000;
pub static JPEG_SUBSAMPLING_420:i32=0x4000;
pub static JPEG_SUBSAMPLING_422:i32=0x8000;
pub static JPEG_SUBSAMPLING_444:i32=0x10000;
pub static PNG_Z_BEST_SPEED:i32=0x0001;
pub static PNG_Z_DEFAULT_COMPRESSION:i32=0x0006;
pub static PNG_Z_BEST_COMPRESSION:i32=0x0009;
pub static PNG_Z_NO_COMPRESSION:i32=0x0100;
pub static PNG_INTERLACED:i32=0x0200;
pub static PNM_SAVE_ASCII:i32=1;
pub static TIFF_CMYK:i32=0x0001;
pub static TIFF_PACKBITS:i32=0x0100;
pub static TIFF_DEFLATE:i32=0x0200;
pub static TIFF_ADOBE_DEFLATE:i32=0x0400;
pub static TIFF_NONE:i32=0x0800;
pub static TIFF_CCITTFAX3:i32=0x1000;
pub static TIFF_CCITTFAX4:i32=0x2000;
pub static TIFF_LZW:i32=0x4000;
pub static TIFF_JPEG:i32=0x8000;