-
Notifications
You must be signed in to change notification settings - Fork 0
/
FreeImage.cs
52 lines (47 loc) · 1.18 KB
/
FreeImage.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Graphics
{
public enum FIF
{
FIF_UNKNOWN = -1,
FIF_BMP = 0,
FIF_ICO = 1,
FIF_JPEG = 2,
FIF_JNG = 3,
FIF_KOALA = 4,
FIF_LBM = 5,
FIF_MNG = 6,
FIF_PBM = 7,
FIF_PBMRAW = 8,
FIF_PCD = 9,
FIF_PCX = 10,
FIF_PGM = 11,
FIF_PGMRAW = 12,
FIF_PNG = 13,
FIF_PPM = 14,
FIF_PPMRAW = 15,
FIF_RAS = 16,
FIF_TARGA = 17,
FIF_TIFF = 18,
FIF_WBMP = 19,
FIF_PSD = 20,
FIF_CUT = 21,
FIF_IFF = FIF_LBM,
FIF_XBM = 22,
FIF_XPM = 23
}
public class FreeImage
{
[DllImport("FreeImage.dll")]
public static extern int FreeImage_Load(FIF format, string filename, int flags);
[DllImport("FreeImage.dll")]
public static extern void FreeImage_Unload(int handle);
[DllImport("FreeImage.dll")]
public static extern bool FreeImage_Save(FIF format, int handle, string filename, int flags);
}
}