FreeImagePlus  - FreeImage 3.17.0
FreeImage.h
1 // ==========================================================
2 // FreeImage 3
3 //
4 // Design and implementation by
5 // - Floris van den Berg (flvdberg@wxs.nl)
6 // - Herve Drolon (drolon@infonie.fr)
7 //
8 // Contributors:
9 // - see changes log named 'Whatsnew.txt', see header of each .h and .cpp file
10 //
11 // This file is part of FreeImage 3
12 //
13 // COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
14 // OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
15 // THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
16 // OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
17 // CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
18 // THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
19 // SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
20 // PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
21 // THIS DISCLAIMER.
22 //
23 // Use at your own risk!
24 // ==========================================================
25 
26 #ifndef FREEIMAGE_H
27 #define FREEIMAGE_H
28 
29 // Version information ------------------------------------------------------
30 
31 #define FREEIMAGE_MAJOR_VERSION 3
32 #define FREEIMAGE_MINOR_VERSION 17
33 #define FREEIMAGE_RELEASE_SERIAL 0
34 
35 // Compiler options ---------------------------------------------------------
36 
37 #include <wchar.h> // needed for UNICODE functions
38 
39 #if defined(FREEIMAGE_LIB)
40  #define DLL_API
41  #define DLL_CALLCONV
42 #else
43  #if defined(_WIN32) || defined(__WIN32__)
44  #define DLL_CALLCONV __stdcall
45  // The following ifdef block is the standard way of creating macros which make exporting
46  // from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS
47  // symbol defined on the command line. this symbol should not be defined on any project
48  // that uses this DLL. This way any other project whose source files include this file see
49  // DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
50  // defined with this macro as being exported.
51  #ifdef FREEIMAGE_EXPORTS
52  #define DLL_API __declspec(dllexport)
53  #else
54  #define DLL_API __declspec(dllimport)
55  #endif // FREEIMAGE_EXPORTS
56  #else
57  // try the gcc visibility support (see http://gcc.gnu.org/wiki/Visibility)
58  #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
59  #ifndef GCC_HASCLASSVISIBILITY
60  #define GCC_HASCLASSVISIBILITY
61  #endif
62  #endif // __GNUC__
63  #define DLL_CALLCONV
64  #if defined(GCC_HASCLASSVISIBILITY)
65  #define DLL_API __attribute__ ((visibility("default")))
66  #else
67  #define DLL_API
68  #endif
69  #endif // WIN32 / !WIN32
70 #endif // FREEIMAGE_LIB
71 
72 // Endianness:
73 // Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined.
74 // If your big endian system isn't being detected, add an OS specific check
75 // or define any of FREEIMAGE_BIGENDIAN and FREEIMAGE_LITTLEENDIAN directly
76 // to specify the desired endianness.
77 #if (!defined(FREEIMAGE_BIGENDIAN) && !defined(FREEIMAGE_LITTLEENDIAN))
78  #if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || (defined(__BYTE_ORDER) && __BYTE_ORDER==__ORDER_BIG_ENDIAN__) || defined(__BIG_ENDIAN__)
79  #define FREEIMAGE_BIGENDIAN
80  #endif // BYTE_ORDER
81 #endif // !FREEIMAGE_[BIG|LITTLE]ENDIAN
82 
83 // Color-Order:
84 // The specified order of color components red, green and blue affects 24-
85 // and 32-bit images of type FIT_BITMAP as well as the colors that are part
86 // of a color palette. All other images always use RGB order. By default,
87 // color order is coupled to endianness:
88 // little-endian -> BGR
89 // big-endian -> RGB
90 // However, you can always define FREEIMAGE_COLORORDER to any of the known
91 // orders FREEIMAGE_COLORORDER_BGR (0) and FREEIMAGE_COLORORDER_RGB (1) to
92 // specify your preferred color order.
93 #define FREEIMAGE_COLORORDER_BGR 0
94 #define FREEIMAGE_COLORORDER_RGB 1
95 #if (!defined(FREEIMAGE_COLORORDER)) || ((FREEIMAGE_COLORORDER != FREEIMAGE_COLORORDER_BGR) && (FREEIMAGE_COLORORDER != FREEIMAGE_COLORORDER_RGB))
96  #if defined(FREEIMAGE_BIGENDIAN)
97  #define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_RGB
98  #else
99  #define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_BGR
100  #endif // FREEIMAGE_BIGENDIAN
101 #endif // FREEIMAGE_COLORORDER
102 
103 // Ensure 4-byte enums if we're using Borland C++ compilers
104 #if defined(__BORLANDC__)
105 #pragma option push -b
106 #endif
107 
108 // For C compatibility --------------------------------------------------------
109 
110 #ifdef __cplusplus
111 #define FI_DEFAULT(x) = x
112 #define FI_ENUM(x) enum x
113 #define FI_STRUCT(x) struct x
114 #else
115 #define FI_DEFAULT(x)
116 #define FI_ENUM(x) typedef int x; enum x
117 #define FI_STRUCT(x) typedef struct x x; struct x
118 #endif
119 
120 // Bitmap types -------------------------------------------------------------
121 
122 FI_STRUCT (FIBITMAP) { void *data; };
123 FI_STRUCT (FIMULTIBITMAP) { void *data; };
124 
125 // Types used in the library (directly copied from Windows) -----------------
126 
127 #if defined(__MINGW32__) && defined(_WINDOWS_H)
128 #define _WINDOWS_ // prevent a bug in MinGW32
129 #endif // __MINGW32__
130 
131 #ifndef _WINDOWS_
132 #define _WINDOWS_
133 
134 #ifndef FALSE
135 #define FALSE 0
136 #endif
137 #ifndef TRUE
138 #define TRUE 1
139 #endif
140 #ifndef NULL
141 #define NULL 0
142 #endif
143 
144 #ifndef SEEK_SET
145 #define SEEK_SET 0
146 #define SEEK_CUR 1
147 #define SEEK_END 2
148 #endif
149 
150 #ifndef _MSC_VER
151 // define portable types for 32-bit / 64-bit OS
152 #include <inttypes.h>
153 typedef int32_t BOOL;
154 typedef uint8_t BYTE;
155 typedef uint16_t WORD;
156 typedef uint32_t DWORD;
157 typedef int32_t LONG;
158 #ifndef _LIBRAW_TYPES_H
159 typedef int64_t INT64;
160 typedef uint64_t UINT64;
161 #endif
162 #else
163 // MS is not C99 ISO compliant
164 typedef long BOOL;
165 typedef unsigned char BYTE;
166 typedef unsigned short WORD;
167 typedef unsigned long DWORD;
168 typedef long LONG;
169 typedef signed __int64 INT64;
170 typedef unsigned __int64 UINT64;
171 #endif // _MSC_VER
172 
173 #if (defined(_WIN32) || defined(__WIN32__))
174 #pragma pack(push, 1)
175 #else
176 #pragma pack(1)
177 #endif // WIN32
178 
179 typedef struct tagRGBQUAD {
180 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
181  BYTE rgbBlue;
182  BYTE rgbGreen;
183  BYTE rgbRed;
184 #else
185  BYTE rgbRed;
186  BYTE rgbGreen;
187  BYTE rgbBlue;
188 #endif // FREEIMAGE_COLORORDER
189  BYTE rgbReserved;
190 } RGBQUAD;
191 
192 typedef struct tagRGBTRIPLE {
193 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
194  BYTE rgbtBlue;
195  BYTE rgbtGreen;
196  BYTE rgbtRed;
197 #else
198  BYTE rgbtRed;
199  BYTE rgbtGreen;
200  BYTE rgbtBlue;
201 #endif // FREEIMAGE_COLORORDER
202 } RGBTRIPLE;
203 
204 #if (defined(_WIN32) || defined(__WIN32__))
205 #pragma pack(pop)
206 #else
207 #pragma pack()
208 #endif // WIN32
209 
210 typedef struct tagBITMAPINFOHEADER{
211  DWORD biSize;
212  LONG biWidth;
213  LONG biHeight;
214  WORD biPlanes;
215  WORD biBitCount;
216  DWORD biCompression;
217  DWORD biSizeImage;
218  LONG biXPelsPerMeter;
219  LONG biYPelsPerMeter;
220  DWORD biClrUsed;
221  DWORD biClrImportant;
223 
224 typedef struct tagBITMAPINFO {
225  BITMAPINFOHEADER bmiHeader;
226  RGBQUAD bmiColors[1];
228 
229 #endif // _WINDOWS_
230 
231 // Types used in the library (specific to FreeImage) ------------------------
232 
233 #if (defined(_WIN32) || defined(__WIN32__))
234 #pragma pack(push, 1)
235 #else
236 #pragma pack(1)
237 #endif // WIN32
238 
241 typedef struct tagFIRGB16 {
242  WORD red;
243  WORD green;
244  WORD blue;
245 } FIRGB16;
246 
249 typedef struct tagFIRGBA16 {
250  WORD red;
251  WORD green;
252  WORD blue;
253  WORD alpha;
254 } FIRGBA16;
255 
258 typedef struct tagFIRGBF {
259  float red;
260  float green;
261  float blue;
262 } FIRGBF;
263 
266 typedef struct tagFIRGBAF {
267  float red;
268  float green;
269  float blue;
270  float alpha;
271 } FIRGBAF;
272 
275 typedef struct tagFICOMPLEX {
277  double r;
279  double i;
280 } FICOMPLEX;
281 
282 #if (defined(_WIN32) || defined(__WIN32__))
283 #pragma pack(pop)
284 #else
285 #pragma pack()
286 #endif // WIN32
287 
288 // Indexes for byte arrays, masks and shifts for treating pixels as words ---
289 // These coincide with the order of RGBQUAD and RGBTRIPLE -------------------
290 
291 #ifndef FREEIMAGE_BIGENDIAN
292 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
293 // Little Endian (x86 / MS Windows, Linux) : BGR(A) order
294 #define FI_RGBA_RED 2
295 #define FI_RGBA_GREEN 1
296 #define FI_RGBA_BLUE 0
297 #define FI_RGBA_ALPHA 3
298 #define FI_RGBA_RED_MASK 0x00FF0000
299 #define FI_RGBA_GREEN_MASK 0x0000FF00
300 #define FI_RGBA_BLUE_MASK 0x000000FF
301 #define FI_RGBA_ALPHA_MASK 0xFF000000
302 #define FI_RGBA_RED_SHIFT 16
303 #define FI_RGBA_GREEN_SHIFT 8
304 #define FI_RGBA_BLUE_SHIFT 0
305 #define FI_RGBA_ALPHA_SHIFT 24
306 #else
307 // Little Endian (x86 / MaxOSX) : RGB(A) order
308 #define FI_RGBA_RED 0
309 #define FI_RGBA_GREEN 1
310 #define FI_RGBA_BLUE 2
311 #define FI_RGBA_ALPHA 3
312 #define FI_RGBA_RED_MASK 0x000000FF
313 #define FI_RGBA_GREEN_MASK 0x0000FF00
314 #define FI_RGBA_BLUE_MASK 0x00FF0000
315 #define FI_RGBA_ALPHA_MASK 0xFF000000
316 #define FI_RGBA_RED_SHIFT 0
317 #define FI_RGBA_GREEN_SHIFT 8
318 #define FI_RGBA_BLUE_SHIFT 16
319 #define FI_RGBA_ALPHA_SHIFT 24
320 #endif // FREEIMAGE_COLORORDER
321 #else
322 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
323 // Big Endian (PPC / none) : BGR(A) order
324 #define FI_RGBA_RED 2
325 #define FI_RGBA_GREEN 1
326 #define FI_RGBA_BLUE 0
327 #define FI_RGBA_ALPHA 3
328 #define FI_RGBA_RED_MASK 0x0000FF00
329 #define FI_RGBA_GREEN_MASK 0x00FF0000
330 #define FI_RGBA_BLUE_MASK 0xFF000000
331 #define FI_RGBA_ALPHA_MASK 0x000000FF
332 #define FI_RGBA_RED_SHIFT 8
333 #define FI_RGBA_GREEN_SHIFT 16
334 #define FI_RGBA_BLUE_SHIFT 24
335 #define FI_RGBA_ALPHA_SHIFT 0
336 #else
337 // Big Endian (PPC / Linux, MaxOSX) : RGB(A) order
338 #define FI_RGBA_RED 0
339 #define FI_RGBA_GREEN 1
340 #define FI_RGBA_BLUE 2
341 #define FI_RGBA_ALPHA 3
342 #define FI_RGBA_RED_MASK 0xFF000000
343 #define FI_RGBA_GREEN_MASK 0x00FF0000
344 #define FI_RGBA_BLUE_MASK 0x0000FF00
345 #define FI_RGBA_ALPHA_MASK 0x000000FF
346 #define FI_RGBA_RED_SHIFT 24
347 #define FI_RGBA_GREEN_SHIFT 16
348 #define FI_RGBA_BLUE_SHIFT 8
349 #define FI_RGBA_ALPHA_SHIFT 0
350 #endif // FREEIMAGE_COLORORDER
351 #endif // FREEIMAGE_BIGENDIAN
352 
353 #define FI_RGBA_RGB_MASK (FI_RGBA_RED_MASK|FI_RGBA_GREEN_MASK|FI_RGBA_BLUE_MASK)
354 
355 // The 16bit macros only include masks and shifts, since each color element is not byte aligned
356 
357 #define FI16_555_RED_MASK 0x7C00
358 #define FI16_555_GREEN_MASK 0x03E0
359 #define FI16_555_BLUE_MASK 0x001F
360 #define FI16_555_RED_SHIFT 10
361 #define FI16_555_GREEN_SHIFT 5
362 #define FI16_555_BLUE_SHIFT 0
363 #define FI16_565_RED_MASK 0xF800
364 #define FI16_565_GREEN_MASK 0x07E0
365 #define FI16_565_BLUE_MASK 0x001F
366 #define FI16_565_RED_SHIFT 11
367 #define FI16_565_GREEN_SHIFT 5
368 #define FI16_565_BLUE_SHIFT 0
369 
370 // ICC profile support ------------------------------------------------------
371 
372 #define FIICC_DEFAULT 0x00
373 #define FIICC_COLOR_IS_CMYK 0x01
374 
375 FI_STRUCT (FIICCPROFILE) {
376  WORD flags;
377  DWORD size;
378  void *data;
379 };
380 
381 // Important enums ----------------------------------------------------------
382 
385 FI_ENUM(FREE_IMAGE_FORMAT) {
386  FIF_UNKNOWN = -1,
387  FIF_BMP = 0,
388  FIF_ICO = 1,
389  FIF_JPEG = 2,
390  FIF_JNG = 3,
391  FIF_KOALA = 4,
392  FIF_LBM = 5,
393  FIF_IFF = FIF_LBM,
394  FIF_MNG = 6,
395  FIF_PBM = 7,
396  FIF_PBMRAW = 8,
397  FIF_PCD = 9,
398  FIF_PCX = 10,
399  FIF_PGM = 11,
400  FIF_PGMRAW = 12,
401  FIF_PNG = 13,
402  FIF_PPM = 14,
403  FIF_PPMRAW = 15,
404  FIF_RAS = 16,
405  FIF_TARGA = 17,
406  FIF_TIFF = 18,
407  FIF_WBMP = 19,
408  FIF_PSD = 20,
409  FIF_CUT = 21,
410  FIF_XBM = 22,
411  FIF_XPM = 23,
412  FIF_DDS = 24,
413  FIF_GIF = 25,
414  FIF_HDR = 26,
415 /* Debian: The G3 fax format plugin is deliberately disabled in our build of
416  FreeImage, since it requires usage of the vendored copy of libtiff. */
417 #if 0
418  FIF_FAXG3 = 27,
419 #endif
420  FIF_SGI = 28,
421  FIF_EXR = 29,
422  FIF_J2K = 30,
423  FIF_JP2 = 31,
424  FIF_PFM = 32,
425  FIF_PICT = 33,
426  FIF_RAW = 34,
427  FIF_WEBP = 35,
428  FIF_JXR = 36
429 };
430 
433 FI_ENUM(FREE_IMAGE_TYPE) {
434  FIT_UNKNOWN = 0,
435  FIT_BITMAP = 1,
436  FIT_UINT16 = 2,
437  FIT_INT16 = 3,
438  FIT_UINT32 = 4,
439  FIT_INT32 = 5,
440  FIT_FLOAT = 6,
441  FIT_DOUBLE = 7,
442  FIT_COMPLEX = 8,
443  FIT_RGB16 = 9,
444  FIT_RGBA16 = 10,
445  FIT_RGBF = 11,
446  FIT_RGBAF = 12
447 };
448 
451 FI_ENUM(FREE_IMAGE_COLOR_TYPE) {
452  FIC_MINISWHITE = 0,
453  FIC_MINISBLACK = 1,
454  FIC_RGB = 2,
455  FIC_PALETTE = 3,
456  FIC_RGBALPHA = 4,
457  FIC_CMYK = 5
458 };
459 
463 FI_ENUM(FREE_IMAGE_QUANTIZE) {
464  FIQ_WUQUANT = 0,
465  FIQ_NNQUANT = 1,
466  FIQ_LFPQUANT = 2
467 };
468 
472 FI_ENUM(FREE_IMAGE_DITHER) {
473  FID_FS = 0,
474  FID_BAYER4x4 = 1,
475  FID_BAYER8x8 = 2,
476  FID_CLUSTER6x6 = 3,
477  FID_CLUSTER8x8 = 4,
478  FID_CLUSTER16x16= 5,
479  FID_BAYER16x16 = 6
480 };
481 
482 /* Debian: The JPEGTransform functions are deliberately disabled in our build
483  of FreeImage, since they require usage of the vendored copy of libjpeg. */
484 #if 0
485 
488 FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
489  FIJPEG_OP_NONE = 0,
490  FIJPEG_OP_FLIP_H = 1,
491  FIJPEG_OP_FLIP_V = 2,
492  FIJPEG_OP_TRANSPOSE = 3,
493  FIJPEG_OP_TRANSVERSE = 4,
494  FIJPEG_OP_ROTATE_90 = 5,
495  FIJPEG_OP_ROTATE_180 = 6,
496  FIJPEG_OP_ROTATE_270 = 7
497 };
498 #endif
499 
503 FI_ENUM(FREE_IMAGE_TMO) {
504  FITMO_DRAGO03 = 0,
505  FITMO_REINHARD05 = 1,
506  FITMO_FATTAL02 = 2
507 };
508 
512 FI_ENUM(FREE_IMAGE_FILTER) {
513  FILTER_BOX = 0,
514  FILTER_BICUBIC = 1,
515  FILTER_BILINEAR = 2,
516  FILTER_BSPLINE = 3,
517  FILTER_CATMULLROM = 4,
518  FILTER_LANCZOS3 = 5
519 };
520 
524 FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) {
525  FICC_RGB = 0,
526  FICC_RED = 1,
527  FICC_GREEN = 2,
528  FICC_BLUE = 3,
529  FICC_ALPHA = 4,
530  FICC_BLACK = 5,
531  FICC_REAL = 6,
532  FICC_IMAG = 7,
533  FICC_MAG = 8,
534  FICC_PHASE = 9
535 };
536 
537 // Metadata support ---------------------------------------------------------
538 
544 FI_ENUM(FREE_IMAGE_MDTYPE) {
545  FIDT_NOTYPE = 0,
546  FIDT_BYTE = 1,
547  FIDT_ASCII = 2,
548  FIDT_SHORT = 3,
549  FIDT_LONG = 4,
550  FIDT_RATIONAL = 5,
551  FIDT_SBYTE = 6,
552  FIDT_UNDEFINED = 7,
553  FIDT_SSHORT = 8,
554  FIDT_SLONG = 9,
555  FIDT_SRATIONAL = 10,
556  FIDT_FLOAT = 11,
557  FIDT_DOUBLE = 12,
558  FIDT_IFD = 13,
559  FIDT_PALETTE = 14,
560  FIDT_LONG8 = 16,
561  FIDT_SLONG8 = 17,
562  FIDT_IFD8 = 18
563 };
564 
568 FI_ENUM(FREE_IMAGE_MDMODEL) {
569  FIMD_NODATA = -1,
570  FIMD_COMMENTS = 0,
571  FIMD_EXIF_MAIN = 1,
572  FIMD_EXIF_EXIF = 2,
573  FIMD_EXIF_GPS = 3,
574  FIMD_EXIF_MAKERNOTE = 4,
575  FIMD_EXIF_INTEROP = 5,
576  FIMD_IPTC = 6,
577  FIMD_XMP = 7,
578  FIMD_GEOTIFF = 8,
579  FIMD_ANIMATION = 9,
580  FIMD_CUSTOM = 10,
581  FIMD_EXIF_RAW = 11
582 };
583 
587 FI_STRUCT (FIMETADATA) { void *data; };
588 
592 FI_STRUCT (FITAG) { void *data; };
593 
594 // File IO routines ---------------------------------------------------------
595 
596 #ifndef FREEIMAGE_IO
597 #define FREEIMAGE_IO
598 
599 typedef void* fi_handle;
600 typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
601 typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
602 typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin);
603 typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);
604 
605 #if (defined(_WIN32) || defined(__WIN32__))
606 #pragma pack(push, 1)
607 #else
608 #pragma pack(1)
609 #endif // WIN32
610 
611 FI_STRUCT(FreeImageIO) {
612  FI_ReadProc read_proc;
613  FI_WriteProc write_proc;
614  FI_SeekProc seek_proc;
615  FI_TellProc tell_proc;
616 };
617 
618 #if (defined(_WIN32) || defined(__WIN32__))
619 #pragma pack(pop)
620 #else
621 #pragma pack()
622 #endif // WIN32
623 
627 FI_STRUCT (FIMEMORY) { void *data; };
628 
629 #endif // FREEIMAGE_IO
630 
631 // Plugin routines ----------------------------------------------------------
632 
633 #ifndef PLUGINS
634 #define PLUGINS
635 
636 typedef const char *(DLL_CALLCONV *FI_FormatProc)(void);
637 typedef const char *(DLL_CALLCONV *FI_DescriptionProc)(void);
638 typedef const char *(DLL_CALLCONV *FI_ExtensionListProc)(void);
639 typedef const char *(DLL_CALLCONV *FI_RegExprProc)(void);
640 typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);
641 typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, void *data);
642 typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, void *data);
643 typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, void *data);
644 typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle, int page, int flags, void *data);
645 typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data);
646 typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle);
647 typedef const char *(DLL_CALLCONV *FI_MimeProc)(void);
648 typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(int bpp);
649 typedef BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type);
650 typedef BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)(void);
651 typedef BOOL (DLL_CALLCONV *FI_SupportsNoPixelsProc)(void);
652 
653 FI_STRUCT (Plugin) {
654  FI_FormatProc format_proc;
655  FI_DescriptionProc description_proc;
656  FI_ExtensionListProc extension_proc;
657  FI_RegExprProc regexpr_proc;
658  FI_OpenProc open_proc;
659  FI_CloseProc close_proc;
660  FI_PageCountProc pagecount_proc;
661  FI_PageCapabilityProc pagecapability_proc;
662  FI_LoadProc load_proc;
663  FI_SaveProc save_proc;
664  FI_ValidateProc validate_proc;
665  FI_MimeProc mime_proc;
666  FI_SupportsExportBPPProc supports_export_bpp_proc;
667  FI_SupportsExportTypeProc supports_export_type_proc;
668  FI_SupportsICCProfilesProc supports_icc_profiles_proc;
669  FI_SupportsNoPixelsProc supports_no_pixels_proc;
670 };
671 
672 typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id);
673 
674 #endif // PLUGINS
675 
676 
677 // Load / Save flag constants -----------------------------------------------
678 
679 #define FIF_LOAD_NOPIXELS 0x8000
680 
681 #define BMP_DEFAULT 0
682 #define BMP_SAVE_RLE 1
683 #define CUT_DEFAULT 0
684 #define DDS_DEFAULT 0
685 #define EXR_DEFAULT 0
686 #define EXR_FLOAT 0x0001
687 #define EXR_NONE 0x0002
688 #define EXR_ZIP 0x0004
689 #define EXR_PIZ 0x0008
690 #define EXR_PXR24 0x0010
691 #define EXR_B44 0x0020
692 #define EXR_LC 0x0040
693 #define FAXG3_DEFAULT 0
694 #define GIF_DEFAULT 0
695 #define GIF_LOAD256 1
696 #define GIF_PLAYBACK 2
697 #define HDR_DEFAULT 0
698 #define ICO_DEFAULT 0
699 #define ICO_MAKEALPHA 1
700 #define IFF_DEFAULT 0
701 #define J2K_DEFAULT 0
702 #define JP2_DEFAULT 0
703 #define JPEG_DEFAULT 0
704 #define JPEG_FAST 0x0001
705 #define JPEG_ACCURATE 0x0002
706 #define JPEG_CMYK 0x0004
707 #define JPEG_EXIFROTATE 0x0008
708 #define JPEG_GREYSCALE 0x0010
709 #define JPEG_QUALITYSUPERB 0x80
710 #define JPEG_QUALITYGOOD 0x0100
711 #define JPEG_QUALITYNORMAL 0x0200
712 #define JPEG_QUALITYAVERAGE 0x0400
713 #define JPEG_QUALITYBAD 0x0800
714 #define JPEG_PROGRESSIVE 0x2000
715 #define JPEG_SUBSAMPLING_411 0x1000
716 #define JPEG_SUBSAMPLING_420 0x4000
717 #define JPEG_SUBSAMPLING_422 0x8000
718 #define JPEG_SUBSAMPLING_444 0x10000
719 #define JPEG_OPTIMIZE 0x20000
720 #define JPEG_BASELINE 0x40000
721 #define KOALA_DEFAULT 0
722 #define LBM_DEFAULT 0
723 #define MNG_DEFAULT 0
724 #define PCD_DEFAULT 0
725 #define PCD_BASE 1
726 #define PCD_BASEDIV4 2
727 #define PCD_BASEDIV16 3
728 #define PCX_DEFAULT 0
729 #define PFM_DEFAULT 0
730 #define PICT_DEFAULT 0
731 #define PNG_DEFAULT 0
732 #define PNG_IGNOREGAMMA 1
733 #define PNG_Z_BEST_SPEED 0x0001
734 #define PNG_Z_DEFAULT_COMPRESSION 0x0006
735 #define PNG_Z_BEST_COMPRESSION 0x0009
736 #define PNG_Z_NO_COMPRESSION 0x0100
737 #define PNG_INTERLACED 0x0200
738 #define PNM_DEFAULT 0
739 #define PNM_SAVE_RAW 0
740 #define PNM_SAVE_ASCII 1
741 #define PSD_DEFAULT 0
742 #define PSD_CMYK 1
743 #define PSD_LAB 2
744 #define RAS_DEFAULT 0
745 #define RAW_DEFAULT 0
746 #define RAW_PREVIEW 1
747 #define RAW_DISPLAY 2
748 #define RAW_HALFSIZE 4
749 #define RAW_UNPROCESSED 8
750 #define SGI_DEFAULT 0
751 #define TARGA_DEFAULT 0
752 #define TARGA_LOAD_RGB888 1
753 #define TARGA_SAVE_RLE 2
754 #define TIFF_DEFAULT 0
755 #define TIFF_CMYK 0x0001
756 #define TIFF_PACKBITS 0x0100
757 #define TIFF_DEFLATE 0x0200
758 #define TIFF_ADOBE_DEFLATE 0x0400
759 #define TIFF_NONE 0x0800
760 #define TIFF_CCITTFAX3 0x1000
761 #define TIFF_CCITTFAX4 0x2000
762 #define TIFF_LZW 0x4000
763 #define TIFF_JPEG 0x8000
764 #define TIFF_LOGLUV 0x10000
765 #define WBMP_DEFAULT 0
766 #define XBM_DEFAULT 0
767 #define XPM_DEFAULT 0
768 #define WEBP_DEFAULT 0
769 #define WEBP_LOSSLESS 0x100
770 #define JXR_DEFAULT 0
771 #define JXR_LOSSLESS 0x0064
772 #define JXR_PROGRESSIVE 0x2000
773 
774 // Background filling options ---------------------------------------------------------
775 // Constants used in FreeImage_FillBackground and FreeImage_EnlargeCanvas
776 
777 #define FI_COLOR_IS_RGB_COLOR 0x00
778 #define FI_COLOR_IS_RGBA_COLOR 0x01
779 #define FI_COLOR_FIND_EQUAL_COLOR 0x02
780 #define FI_COLOR_ALPHA_IS_INDEX 0x04
781 #define FI_COLOR_PALETTE_SEARCH_MASK (FI_COLOR_FIND_EQUAL_COLOR | FI_COLOR_ALPHA_IS_INDEX) // No color lookup is performed
782 
783 // RescaleEx options ---------------------------------------------------------
784 // Constants used in FreeImage_RescaleEx
785 
786 #define FI_RESCALE_DEFAULT 0x00
787 #define FI_RESCALE_TRUE_COLOR 0x01
788 #define FI_RESCALE_OMIT_METADATA 0x02
789 
790 
791 #ifdef __cplusplus
792 extern "C" {
793 #endif
794 
795 // Init / Error routines ----------------------------------------------------
796 
797 DLL_API void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE));
798 DLL_API void DLL_CALLCONV FreeImage_DeInitialise(void);
799 
800 // Version routines ---------------------------------------------------------
801 
802 DLL_API const char *DLL_CALLCONV FreeImage_GetVersion(void);
803 DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void);
804 
805 // Message output functions -------------------------------------------------
806 
807 typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg);
808 typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, const char *msg);
809 
810 DLL_API void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf);
811 DLL_API void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf);
812 DLL_API void DLL_CALLCONV FreeImage_OutputMessageProc(int fif, const char *fmt, ...);
813 
814 // Allocate / Clone / Unload routines ---------------------------------------
815 
816 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Allocate(int width, int height, int bpp, unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
817 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateT(FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
818 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib);
819 DLL_API void DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib);
820 
821 // Header loading routines
822 DLL_API BOOL DLL_CALLCONV FreeImage_HasPixels(FIBITMAP *dib);
823 
824 // Load / Save routines -----------------------------------------------------
825 
826 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif, const char *filename, int flags FI_DEFAULT(0));
827 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));
828 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
829 DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags FI_DEFAULT(0));
830 DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));
831 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
832 
833 // Memory I/O stream routines -----------------------------------------------
834 
835 DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
836 DLL_API void DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream);
837 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
838 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));
839 DLL_API long DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream);
840 DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin);
841 DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
842 DLL_API unsigned DLL_CALLCONV FreeImage_ReadMemory(void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
843 DLL_API unsigned DLL_CALLCONV FreeImage_WriteMemory(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
844 
845 DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
846 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream, int flags);
847 
848 // Plugin Interface ---------------------------------------------------------
849 
850 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterLocalPlugin(FI_InitProc proc_address, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0));
851 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterExternalPlugin(const char *path, const char *format FI_DEFAULT(0), const char *description FI_DEFAULT(0), const char *extension FI_DEFAULT(0), const char *regexpr FI_DEFAULT(0));
852 DLL_API int DLL_CALLCONV FreeImage_GetFIFCount(void);
853 DLL_API int DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable);
854 DLL_API int DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif);
855 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(const char *format);
856 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(const char *mime);
857 DLL_API const char *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif);
858 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif);
859 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif);
860 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif);
861 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif);
862 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(const char *filename);
863 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(const wchar_t *filename);
864 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif);
865 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif);
866 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, int bpp);
867 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
868 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif);
869 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsNoPixels(FREE_IMAGE_FORMAT fif);
870 
871 // Multipaging interface ----------------------------------------------------
872 
873 DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT fif, const char *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0));
874 DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
875 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
876 DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));
877 DLL_API int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap);
878 DLL_API void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data);
879 DLL_API void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data);
880 DLL_API void DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page);
881 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page);
882 DLL_API void DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
883 DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source);
884 DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count);
885 
886 // Filetype request routines ------------------------------------------------
887 
888 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(const char *filename, int size FI_DEFAULT(0));
889 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(const wchar_t *filename, int size FI_DEFAULT(0));
890 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0));
891 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, int size FI_DEFAULT(0));
892 
893 // Image type request routine -----------------------------------------------
894 
895 DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib);
896 
897 // FreeImage helper routines ------------------------------------------------
898 
899 DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void);
900 DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
901 DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
902 
903 // Pixel access routines ----------------------------------------------------
904 
905 DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib);
906 DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib, int scanline);
907 
908 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
909 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
910 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
911 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
912 
913 // DIB info routines --------------------------------------------------------
914 
915 DLL_API unsigned DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib);
916 DLL_API unsigned DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib);
917 DLL_API unsigned DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib);
918 DLL_API unsigned DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib);
919 DLL_API unsigned DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib);
920 DLL_API unsigned DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib);
921 DLL_API unsigned DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib);
922 DLL_API unsigned DLL_CALLCONV FreeImage_GetMemorySize(FIBITMAP *dib);
923 DLL_API RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib);
924 
925 DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib);
926 DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib);
927 DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib, unsigned res);
928 DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib, unsigned res);
929 
930 DLL_API BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib);
931 DLL_API BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib);
932 DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib);
933 
934 DLL_API unsigned DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib);
935 DLL_API unsigned DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib);
936 DLL_API unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib);
937 
938 DLL_API unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib);
939 DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib);
940 DLL_API void DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled);
941 DLL_API void DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, int count);
942 DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib);
943 DLL_API void DLL_CALLCONV FreeImage_SetTransparentIndex(FIBITMAP *dib, int index);
944 DLL_API int DLL_CALLCONV FreeImage_GetTransparentIndex(FIBITMAP *dib);
945 
946 DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib);
947 DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
948 DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
949 
950 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetThumbnail(FIBITMAP *dib);
951 DLL_API BOOL DLL_CALLCONV FreeImage_SetThumbnail(FIBITMAP *dib, FIBITMAP *thumbnail);
952 
953 // ICC profile routines -----------------------------------------------------
954 
955 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib);
956 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size);
957 DLL_API void DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib);
958 
959 // Line conversion routines -------------------------------------------------
960 
961 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, int width_in_pixels);
962 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
963 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, int width_in_pixels);
964 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, int width_in_pixels);
965 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, int width_in_pixels);
966 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, int width_in_pixels);
967 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, int width_in_pixels);
968 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, int width_in_pixels);
969 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, int width_in_pixels);
970 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, int width_in_pixels);
971 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, int width_in_pixels);
972 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, int width_in_pixels);
973 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
974 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
975 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
976 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, int width_in_pixels);
977 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, int width_in_pixels);
978 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, int width_in_pixels);
979 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
980 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
981 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
982 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, int width_in_pixels);
983 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, int width_in_pixels);
984 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, int width_in_pixels);
985 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
986 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
987 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
988 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, int width_in_pixels);
989 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, int width_in_pixels);
990 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, int width_in_pixels);
991 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
992 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
993 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
994 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, int width_in_pixels);
995 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, int width_in_pixels);
996 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels);
997 
998 // Smart conversion routines ------------------------------------------------
999 
1000 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib);
1001 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib);
1002 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib);
1003 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib);
1004 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib);
1005 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib);
1006 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib);
1007 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);
1008 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantizeEx(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize FI_DEFAULT(FIQ_WUQUANT), int PaletteSize FI_DEFAULT(256), int ReserveSize FI_DEFAULT(0), RGBQUAD *ReservePalette FI_DEFAULT(NULL));
1009 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T);
1010 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
1011 
1012 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertFromRawBits(BYTE *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
1013 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertFromRawBitsEx(BOOL copySource, BYTE *bits, FREE_IMAGE_TYPE type, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
1014 DLL_API void DLL_CALLCONV FreeImage_ConvertToRawBits(BYTE *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
1015 
1016 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToFloat(FIBITMAP *dib);
1017 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib);
1018 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBAF(FIBITMAP *dib);
1019 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToUINT16(FIBITMAP *dib);
1020 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGB16(FIBITMAP *dib);
1021 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBA16(FIBITMAP *dib);
1022 
1023 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
1024 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
1025 
1026 // Tone mapping operators ---------------------------------------------------
1027 
1028 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ToneMapping(FIBITMAP *dib, FREE_IMAGE_TMO tmo, double first_param FI_DEFAULT(0), double second_param FI_DEFAULT(0));
1029 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0));
1030 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0));
1031 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05Ex(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0), double adaptation FI_DEFAULT(1), double color_correction FI_DEFAULT(0));
1032 
1033 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoFattal02(FIBITMAP *src, double color_saturation FI_DEFAULT(0.5), double attenuation FI_DEFAULT(0.85));
1034 
1035 // ZLib interface -----------------------------------------------------------
1036 
1037 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
1038 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
1039 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
1040 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
1041 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size);
1042 
1043 // --------------------------------------------------------------------------
1044 // Metadata routines
1045 // --------------------------------------------------------------------------
1046 
1047 // tag creation / destruction
1048 DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag(void);
1049 DLL_API void DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag);
1050 DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag);
1051 
1052 // tag getters and setters
1053 DLL_API const char *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag);
1054 DLL_API const char *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag);
1055 DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag);
1056 DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag);
1057 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag);
1058 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag);
1059 DLL_API const void *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag);
1060 
1061 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag, const char *key);
1062 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag, const char *description);
1063 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD id);
1064 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type);
1065 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count);
1066 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length);
1067 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag, const void *value);
1068 
1069 // iterator
1070 DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
1071 DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag);
1072 DLL_API void DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle);
1073 
1074 // metadata setter and getter
1075 DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag);
1076 DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag);
1077 DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadataKeyValue(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, const char *value);
1078 
1079 // helpers
1080 DLL_API unsigned DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
1081 DLL_API BOOL DLL_CALLCONV FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src);
1082 
1083 // tag to C string conversion
1084 DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make FI_DEFAULT(NULL));
1085 
1086 // --------------------------------------------------------------------------
1087 // JPEG lossless transformation routines
1088 // --------------------------------------------------------------------------
1089 /* Debian: The JPEGTransform functions are deliberately disabled in our build
1090  of FreeImage, since they require usage of the vendored copy of libjpeg. */
1091 #if 0
1092 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
1093 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
1094 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
1095 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCropU(const wchar_t *src_file, const wchar_t *dst_file, int left, int top, int right, int bottom);
1096 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, fi_handle src_handle, FreeImageIO* dst_io, fi_handle dst_handle, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
1097 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
1098 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
1099 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
1100 #endif
1101 
1102 
1103 // --------------------------------------------------------------------------
1104 // Image manipulation toolkit
1105 // --------------------------------------------------------------------------
1106 
1107 // rotation and flipping
1109 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib, double angle);
1110 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor FI_DEFAULT(NULL));
1111 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateEx(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask);
1112 DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib);
1113 DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib);
1114 
1115 // upsampling / downsampling
1116 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter FI_DEFAULT(FILTER_CATMULLROM));
1117 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
1118 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RescaleRect(FIBITMAP *dib, int dst_width, int dst_height, int left, int top, int right, int bottom, FREE_IMAGE_FILTER filter FI_DEFAULT(FILTER_CATMULLROM), unsigned flags FI_DEFAULT(0));
1119 
1120 // color manipulation routines (point operations)
1121 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
1122 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib, double gamma);
1123 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib, double percentage);
1124 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib, double percentage);
1125 DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib);
1126 DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK));
1127 DLL_API int DLL_CALLCONV FreeImage_GetAdjustColorsLookupTable(BYTE *LUT, double brightness, double contrast, double gamma, BOOL invert);
1128 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustColors(FIBITMAP *dib, double brightness, double contrast, double gamma, BOOL invert FI_DEFAULT(FALSE));
1129 DLL_API unsigned DLL_CALLCONV FreeImage_ApplyColorMapping(FIBITMAP *dib, RGBQUAD *srccolors, RGBQUAD *dstcolors, unsigned count, BOOL ignore_alpha, BOOL swap);
1130 DLL_API unsigned DLL_CALLCONV FreeImage_SwapColors(FIBITMAP *dib, RGBQUAD *color_a, RGBQUAD *color_b, BOOL ignore_alpha);
1131 DLL_API unsigned DLL_CALLCONV FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices, BYTE *dstindices, unsigned count, BOOL swap);
1132 DLL_API unsigned DLL_CALLCONV FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b);
1133 
1134 // channel processing routines
1135 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
1136 DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
1137 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
1138 DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
1139 
1140 // copy / paste / composite routines
1141 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, int left, int top, int right, int bottom);
1142 DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);
1143 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_CreateView(FIBITMAP *dib, unsigned left, unsigned top, unsigned right, unsigned bottom);
1144 
1145 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
1146 DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib);
1147 
1148 // background filling routines
1149 DLL_API BOOL DLL_CALLCONV FreeImage_FillBackground(FIBITMAP *dib, const void *color, int options FI_DEFAULT(0));
1150 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_EnlargeCanvas(FIBITMAP *src, int left, int top, int right, int bottom, const void *color, int options FI_DEFAULT(0));
1151 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateEx(int width, int height, int bpp, const RGBQUAD *color, int options FI_DEFAULT(0), const RGBQUAD *palette FI_DEFAULT(NULL), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
1152 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateExT(FREE_IMAGE_TYPE type, int width, int height, int bpp, const void *color, int options FI_DEFAULT(0), const RGBQUAD *palette FI_DEFAULT(NULL), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
1153 
1154 // miscellaneous algorithms
1155 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian, int ncycle FI_DEFAULT(3));
1156 
1157 // restore the borland-specific enum size option
1158 #if defined(__BORLANDC__)
1159 #pragma option pop
1160 #endif
1161 
1162 #ifdef __cplusplus
1163 }
1164 #endif
1165 
1166 #endif // FREEIMAGE_H
Data structure for COMPLEX type (complex number)
Definition: FreeImage.h:275
double r
real part
Definition: FreeImage.h:277
96-bit RGB Float
Definition: FreeImage.h:258
Definition: FreeImage.h:179
128-bit RGBA Float
Definition: FreeImage.h:266
64-bit RGBA
Definition: FreeImage.h:249
double i
imaginary part
Definition: FreeImage.h:279
Definition: FreeImage.h:210
48-bit RGB
Definition: FreeImage.h:241
Definition: FreeImage.h:192
Definition: FreeImage.h:224