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  FIF_FAXG3 = 27,
416  FIF_SGI = 28,
417  FIF_EXR = 29,
418  FIF_J2K = 30,
419  FIF_JP2 = 31,
420  FIF_PFM = 32,
421  FIF_PICT = 33,
422  FIF_RAW = 34,
423  FIF_WEBP = 35,
424  FIF_JXR = 36
425 };
426 
429 FI_ENUM(FREE_IMAGE_TYPE) {
430  FIT_UNKNOWN = 0,
431  FIT_BITMAP = 1,
432  FIT_UINT16 = 2,
433  FIT_INT16 = 3,
434  FIT_UINT32 = 4,
435  FIT_INT32 = 5,
436  FIT_FLOAT = 6,
437  FIT_DOUBLE = 7,
438  FIT_COMPLEX = 8,
439  FIT_RGB16 = 9,
440  FIT_RGBA16 = 10,
441  FIT_RGBF = 11,
442  FIT_RGBAF = 12
443 };
444 
447 FI_ENUM(FREE_IMAGE_COLOR_TYPE) {
448  FIC_MINISWHITE = 0,
449  FIC_MINISBLACK = 1,
450  FIC_RGB = 2,
451  FIC_PALETTE = 3,
452  FIC_RGBALPHA = 4,
453  FIC_CMYK = 5
454 };
455 
459 FI_ENUM(FREE_IMAGE_QUANTIZE) {
460  FIQ_WUQUANT = 0,
461  FIQ_NNQUANT = 1,
462  FIQ_LFPQUANT = 2
463 };
464 
468 FI_ENUM(FREE_IMAGE_DITHER) {
469  FID_FS = 0,
470  FID_BAYER4x4 = 1,
471  FID_BAYER8x8 = 2,
472  FID_CLUSTER6x6 = 3,
473  FID_CLUSTER8x8 = 4,
474  FID_CLUSTER16x16= 5,
475  FID_BAYER16x16 = 6
476 };
477 
478 /* Debian: The JPEGTransform functions are deliberately disabled in our build
479  of FreeImage, since they require usage of the vendored copy of libjpeg. */
480 #if 0
481 
484 FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
485  FIJPEG_OP_NONE = 0,
486  FIJPEG_OP_FLIP_H = 1,
487  FIJPEG_OP_FLIP_V = 2,
488  FIJPEG_OP_TRANSPOSE = 3,
489  FIJPEG_OP_TRANSVERSE = 4,
490  FIJPEG_OP_ROTATE_90 = 5,
491  FIJPEG_OP_ROTATE_180 = 6,
492  FIJPEG_OP_ROTATE_270 = 7
493 };
494 #endif
495 
499 FI_ENUM(FREE_IMAGE_TMO) {
500  FITMO_DRAGO03 = 0,
501  FITMO_REINHARD05 = 1,
502  FITMO_FATTAL02 = 2
503 };
504 
508 FI_ENUM(FREE_IMAGE_FILTER) {
509  FILTER_BOX = 0,
510  FILTER_BICUBIC = 1,
511  FILTER_BILINEAR = 2,
512  FILTER_BSPLINE = 3,
513  FILTER_CATMULLROM = 4,
514  FILTER_LANCZOS3 = 5
515 };
516 
520 FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) {
521  FICC_RGB = 0,
522  FICC_RED = 1,
523  FICC_GREEN = 2,
524  FICC_BLUE = 3,
525  FICC_ALPHA = 4,
526  FICC_BLACK = 5,
527  FICC_REAL = 6,
528  FICC_IMAG = 7,
529  FICC_MAG = 8,
530  FICC_PHASE = 9
531 };
532 
533 // Metadata support ---------------------------------------------------------
534 
540 FI_ENUM(FREE_IMAGE_MDTYPE) {
541  FIDT_NOTYPE = 0,
542  FIDT_BYTE = 1,
543  FIDT_ASCII = 2,
544  FIDT_SHORT = 3,
545  FIDT_LONG = 4,
546  FIDT_RATIONAL = 5,
547  FIDT_SBYTE = 6,
548  FIDT_UNDEFINED = 7,
549  FIDT_SSHORT = 8,
550  FIDT_SLONG = 9,
551  FIDT_SRATIONAL = 10,
552  FIDT_FLOAT = 11,
553  FIDT_DOUBLE = 12,
554  FIDT_IFD = 13,
555  FIDT_PALETTE = 14,
556  FIDT_LONG8 = 16,
557  FIDT_SLONG8 = 17,
558  FIDT_IFD8 = 18
559 };
560 
564 FI_ENUM(FREE_IMAGE_MDMODEL) {
565  FIMD_NODATA = -1,
566  FIMD_COMMENTS = 0,
567  FIMD_EXIF_MAIN = 1,
568  FIMD_EXIF_EXIF = 2,
569  FIMD_EXIF_GPS = 3,
570  FIMD_EXIF_MAKERNOTE = 4,
571  FIMD_EXIF_INTEROP = 5,
572  FIMD_IPTC = 6,
573  FIMD_XMP = 7,
574  FIMD_GEOTIFF = 8,
575  FIMD_ANIMATION = 9,
576  FIMD_CUSTOM = 10,
577  FIMD_EXIF_RAW = 11
578 };
579 
583 FI_STRUCT (FIMETADATA) { void *data; };
584 
588 FI_STRUCT (FITAG) { void *data; };
589 
590 // File IO routines ---------------------------------------------------------
591 
592 #ifndef FREEIMAGE_IO
593 #define FREEIMAGE_IO
594 
595 typedef void* fi_handle;
596 typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
597 typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
598 typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin);
599 typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);
600 
601 #if (defined(_WIN32) || defined(__WIN32__))
602 #pragma pack(push, 1)
603 #else
604 #pragma pack(1)
605 #endif // WIN32
606 
607 FI_STRUCT(FreeImageIO) {
608  FI_ReadProc read_proc;
609  FI_WriteProc write_proc;
610  FI_SeekProc seek_proc;
611  FI_TellProc tell_proc;
612 };
613 
614 #if (defined(_WIN32) || defined(__WIN32__))
615 #pragma pack(pop)
616 #else
617 #pragma pack()
618 #endif // WIN32
619 
623 FI_STRUCT (FIMEMORY) { void *data; };
624 
625 #endif // FREEIMAGE_IO
626 
627 // Plugin routines ----------------------------------------------------------
628 
629 #ifndef PLUGINS
630 #define PLUGINS
631 
632 typedef const char *(DLL_CALLCONV *FI_FormatProc)(void);
633 typedef const char *(DLL_CALLCONV *FI_DescriptionProc)(void);
634 typedef const char *(DLL_CALLCONV *FI_ExtensionListProc)(void);
635 typedef const char *(DLL_CALLCONV *FI_RegExprProc)(void);
636 typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);
637 typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, void *data);
638 typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, void *data);
639 typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, void *data);
640 typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle, int page, int flags, void *data);
641 typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data);
642 typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle);
643 typedef const char *(DLL_CALLCONV *FI_MimeProc)(void);
644 typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(int bpp);
645 typedef BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type);
646 typedef BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)(void);
647 typedef BOOL (DLL_CALLCONV *FI_SupportsNoPixelsProc)(void);
648 
649 FI_STRUCT (Plugin) {
650  FI_FormatProc format_proc;
651  FI_DescriptionProc description_proc;
652  FI_ExtensionListProc extension_proc;
653  FI_RegExprProc regexpr_proc;
654  FI_OpenProc open_proc;
655  FI_CloseProc close_proc;
656  FI_PageCountProc pagecount_proc;
657  FI_PageCapabilityProc pagecapability_proc;
658  FI_LoadProc load_proc;
659  FI_SaveProc save_proc;
660  FI_ValidateProc validate_proc;
661  FI_MimeProc mime_proc;
662  FI_SupportsExportBPPProc supports_export_bpp_proc;
663  FI_SupportsExportTypeProc supports_export_type_proc;
664  FI_SupportsICCProfilesProc supports_icc_profiles_proc;
665  FI_SupportsNoPixelsProc supports_no_pixels_proc;
666 };
667 
668 typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id);
669 
670 #endif // PLUGINS
671 
672 
673 // Load / Save flag constants -----------------------------------------------
674 
675 #define FIF_LOAD_NOPIXELS 0x8000
676 
677 #define BMP_DEFAULT 0
678 #define BMP_SAVE_RLE 1
679 #define CUT_DEFAULT 0
680 #define DDS_DEFAULT 0
681 #define EXR_DEFAULT 0
682 #define EXR_FLOAT 0x0001
683 #define EXR_NONE 0x0002
684 #define EXR_ZIP 0x0004
685 #define EXR_PIZ 0x0008
686 #define EXR_PXR24 0x0010
687 #define EXR_B44 0x0020
688 #define EXR_LC 0x0040
689 #define FAXG3_DEFAULT 0
690 #define GIF_DEFAULT 0
691 #define GIF_LOAD256 1
692 #define GIF_PLAYBACK 2
693 #define HDR_DEFAULT 0
694 #define ICO_DEFAULT 0
695 #define ICO_MAKEALPHA 1
696 #define IFF_DEFAULT 0
697 #define J2K_DEFAULT 0
698 #define JP2_DEFAULT 0
699 #define JPEG_DEFAULT 0
700 #define JPEG_FAST 0x0001
701 #define JPEG_ACCURATE 0x0002
702 #define JPEG_CMYK 0x0004
703 #define JPEG_EXIFROTATE 0x0008
704 #define JPEG_GREYSCALE 0x0010
705 #define JPEG_QUALITYSUPERB 0x80
706 #define JPEG_QUALITYGOOD 0x0100
707 #define JPEG_QUALITYNORMAL 0x0200
708 #define JPEG_QUALITYAVERAGE 0x0400
709 #define JPEG_QUALITYBAD 0x0800
710 #define JPEG_PROGRESSIVE 0x2000
711 #define JPEG_SUBSAMPLING_411 0x1000
712 #define JPEG_SUBSAMPLING_420 0x4000
713 #define JPEG_SUBSAMPLING_422 0x8000
714 #define JPEG_SUBSAMPLING_444 0x10000
715 #define JPEG_OPTIMIZE 0x20000
716 #define JPEG_BASELINE 0x40000
717 #define KOALA_DEFAULT 0
718 #define LBM_DEFAULT 0
719 #define MNG_DEFAULT 0
720 #define PCD_DEFAULT 0
721 #define PCD_BASE 1
722 #define PCD_BASEDIV4 2
723 #define PCD_BASEDIV16 3
724 #define PCX_DEFAULT 0
725 #define PFM_DEFAULT 0
726 #define PICT_DEFAULT 0
727 #define PNG_DEFAULT 0
728 #define PNG_IGNOREGAMMA 1
729 #define PNG_Z_BEST_SPEED 0x0001
730 #define PNG_Z_DEFAULT_COMPRESSION 0x0006
731 #define PNG_Z_BEST_COMPRESSION 0x0009
732 #define PNG_Z_NO_COMPRESSION 0x0100
733 #define PNG_INTERLACED 0x0200
734 #define PNM_DEFAULT 0
735 #define PNM_SAVE_RAW 0
736 #define PNM_SAVE_ASCII 1
737 #define PSD_DEFAULT 0
738 #define PSD_CMYK 1
739 #define PSD_LAB 2
740 #define RAS_DEFAULT 0
741 #define RAW_DEFAULT 0
742 #define RAW_PREVIEW 1
743 #define RAW_DISPLAY 2
744 #define RAW_HALFSIZE 4
745 #define RAW_UNPROCESSED 8
746 #define SGI_DEFAULT 0
747 #define TARGA_DEFAULT 0
748 #define TARGA_LOAD_RGB888 1
749 #define TARGA_SAVE_RLE 2
750 #define TIFF_DEFAULT 0
751 #define TIFF_CMYK 0x0001
752 #define TIFF_PACKBITS 0x0100
753 #define TIFF_DEFLATE 0x0200
754 #define TIFF_ADOBE_DEFLATE 0x0400
755 #define TIFF_NONE 0x0800
756 #define TIFF_CCITTFAX3 0x1000
757 #define TIFF_CCITTFAX4 0x2000
758 #define TIFF_LZW 0x4000
759 #define TIFF_JPEG 0x8000
760 #define TIFF_LOGLUV 0x10000
761 #define WBMP_DEFAULT 0
762 #define XBM_DEFAULT 0
763 #define XPM_DEFAULT 0
764 #define WEBP_DEFAULT 0
765 #define WEBP_LOSSLESS 0x100
766 #define JXR_DEFAULT 0
767 #define JXR_LOSSLESS 0x0064
768 #define JXR_PROGRESSIVE 0x2000
769 
770 // Background filling options ---------------------------------------------------------
771 // Constants used in FreeImage_FillBackground and FreeImage_EnlargeCanvas
772 
773 #define FI_COLOR_IS_RGB_COLOR 0x00
774 #define FI_COLOR_IS_RGBA_COLOR 0x01
775 #define FI_COLOR_FIND_EQUAL_COLOR 0x02
776 #define FI_COLOR_ALPHA_IS_INDEX 0x04
777 #define FI_COLOR_PALETTE_SEARCH_MASK (FI_COLOR_FIND_EQUAL_COLOR | FI_COLOR_ALPHA_IS_INDEX) // No color lookup is performed
778 
779 // RescaleEx options ---------------------------------------------------------
780 // Constants used in FreeImage_RescaleEx
781 
782 #define FI_RESCALE_DEFAULT 0x00
783 #define FI_RESCALE_TRUE_COLOR 0x01
784 #define FI_RESCALE_OMIT_METADATA 0x02
785 
786 
787 #ifdef __cplusplus
788 extern "C" {
789 #endif
790 
791 // Init / Error routines ----------------------------------------------------
792 
793 DLL_API void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE));
794 DLL_API void DLL_CALLCONV FreeImage_DeInitialise(void);
795 
796 // Version routines ---------------------------------------------------------
797 
798 DLL_API const char *DLL_CALLCONV FreeImage_GetVersion(void);
799 DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void);
800 
801 // Message output functions -------------------------------------------------
802 
803 typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg);
804 typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, const char *msg);
805 
806 DLL_API void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf);
807 DLL_API void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf);
808 DLL_API void DLL_CALLCONV FreeImage_OutputMessageProc(int fif, const char *fmt, ...);
809 
810 // Allocate / Clone / Unload routines ---------------------------------------
811 
812 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));
813 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));
814 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib);
815 DLL_API void DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib);
816 
817 // Header loading routines
818 DLL_API BOOL DLL_CALLCONV FreeImage_HasPixels(FIBITMAP *dib);
819 
820 // Load / Save routines -----------------------------------------------------
821 
822 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif, const char *filename, int flags FI_DEFAULT(0));
823 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));
824 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
825 DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags FI_DEFAULT(0));
826 DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));
827 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
828 
829 // Memory I/O stream routines -----------------------------------------------
830 
831 DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
832 DLL_API void DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream);
833 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
834 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));
835 DLL_API long DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream);
836 DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin);
837 DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
838 DLL_API unsigned DLL_CALLCONV FreeImage_ReadMemory(void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
839 DLL_API unsigned DLL_CALLCONV FreeImage_WriteMemory(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
840 
841 DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
842 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream, int flags);
843 
844 // Plugin Interface ---------------------------------------------------------
845 
846 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));
847 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));
848 DLL_API int DLL_CALLCONV FreeImage_GetFIFCount(void);
849 DLL_API int DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable);
850 DLL_API int DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif);
851 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(const char *format);
852 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(const char *mime);
853 DLL_API const char *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif);
854 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif);
855 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif);
856 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif);
857 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif);
858 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(const char *filename);
859 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(const wchar_t *filename);
860 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif);
861 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif);
862 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, int bpp);
863 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
864 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif);
865 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsNoPixels(FREE_IMAGE_FORMAT fif);
866 
867 // Multipaging interface ----------------------------------------------------
868 
869 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));
870 DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
871 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
872 DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));
873 DLL_API int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap);
874 DLL_API void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data);
875 DLL_API void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data);
876 DLL_API void DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page);
877 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page);
878 DLL_API void DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
879 DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source);
880 DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count);
881 
882 // Filetype request routines ------------------------------------------------
883 
884 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(const char *filename, int size FI_DEFAULT(0));
885 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(const wchar_t *filename, int size FI_DEFAULT(0));
886 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0));
887 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, int size FI_DEFAULT(0));
888 
889 // Image type request routine -----------------------------------------------
890 
891 DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib);
892 
893 // FreeImage helper routines ------------------------------------------------
894 
895 DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void);
896 DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
897 DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
898 
899 // Pixel access routines ----------------------------------------------------
900 
901 DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib);
902 DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib, int scanline);
903 
904 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
905 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
906 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
907 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
908 
909 // DIB info routines --------------------------------------------------------
910 
911 DLL_API unsigned DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib);
912 DLL_API unsigned DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib);
913 DLL_API unsigned DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib);
914 DLL_API unsigned DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib);
915 DLL_API unsigned DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib);
916 DLL_API unsigned DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib);
917 DLL_API unsigned DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib);
918 DLL_API unsigned DLL_CALLCONV FreeImage_GetMemorySize(FIBITMAP *dib);
919 DLL_API RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib);
920 
921 DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib);
922 DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib);
923 DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib, unsigned res);
924 DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib, unsigned res);
925 
926 DLL_API BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib);
927 DLL_API BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib);
928 DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib);
929 
930 DLL_API unsigned DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib);
931 DLL_API unsigned DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib);
932 DLL_API unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib);
933 
934 DLL_API unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib);
935 DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib);
936 DLL_API void DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled);
937 DLL_API void DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, int count);
938 DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib);
939 DLL_API void DLL_CALLCONV FreeImage_SetTransparentIndex(FIBITMAP *dib, int index);
940 DLL_API int DLL_CALLCONV FreeImage_GetTransparentIndex(FIBITMAP *dib);
941 
942 DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib);
943 DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
944 DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
945 
946 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetThumbnail(FIBITMAP *dib);
947 DLL_API BOOL DLL_CALLCONV FreeImage_SetThumbnail(FIBITMAP *dib, FIBITMAP *thumbnail);
948 
949 // ICC profile routines -----------------------------------------------------
950 
951 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib);
952 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size);
953 DLL_API void DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib);
954 
955 // Line conversion routines -------------------------------------------------
956 
957 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, int width_in_pixels);
958 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
959 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, int width_in_pixels);
960 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, int width_in_pixels);
961 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, int width_in_pixels);
962 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, int width_in_pixels);
963 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, int width_in_pixels);
964 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, int width_in_pixels);
965 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, int width_in_pixels);
966 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, int width_in_pixels);
967 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, int width_in_pixels);
968 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, int width_in_pixels);
969 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
970 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
971 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
972 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, int width_in_pixels);
973 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, int width_in_pixels);
974 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, int width_in_pixels);
975 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
976 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
977 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
978 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, int width_in_pixels);
979 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, int width_in_pixels);
980 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, int width_in_pixels);
981 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
982 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
983 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
984 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, int width_in_pixels);
985 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, int width_in_pixels);
986 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, int width_in_pixels);
987 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
988 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
989 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
990 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, int width_in_pixels);
991 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, int width_in_pixels);
992 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels);
993 
994 // Smart conversion routines ------------------------------------------------
995 
996 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib);
997 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib);
998 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib);
999 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib);
1000 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib);
1001 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib);
1002 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib);
1003 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);
1004 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));
1005 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T);
1006 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
1007 
1008 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));
1009 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));
1010 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));
1011 
1012 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToFloat(FIBITMAP *dib);
1013 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib);
1014 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBAF(FIBITMAP *dib);
1015 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToUINT16(FIBITMAP *dib);
1016 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGB16(FIBITMAP *dib);
1017 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBA16(FIBITMAP *dib);
1018 
1019 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
1020 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
1021 
1022 // Tone mapping operators ---------------------------------------------------
1023 
1024 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));
1025 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0));
1026 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0));
1027 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));
1028 
1029 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoFattal02(FIBITMAP *src, double color_saturation FI_DEFAULT(0.5), double attenuation FI_DEFAULT(0.85));
1030 
1031 // ZLib interface -----------------------------------------------------------
1032 
1033 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
1034 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
1035 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
1036 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
1037 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size);
1038 
1039 // --------------------------------------------------------------------------
1040 // Metadata routines
1041 // --------------------------------------------------------------------------
1042 
1043 // tag creation / destruction
1044 DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag(void);
1045 DLL_API void DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag);
1046 DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag);
1047 
1048 // tag getters and setters
1049 DLL_API const char *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag);
1050 DLL_API const char *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag);
1051 DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag);
1052 DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag);
1053 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag);
1054 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag);
1055 DLL_API const void *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag);
1056 
1057 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag, const char *key);
1058 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag, const char *description);
1059 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD id);
1060 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type);
1061 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count);
1062 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length);
1063 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag, const void *value);
1064 
1065 // iterator
1066 DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
1067 DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag);
1068 DLL_API void DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle);
1069 
1070 // metadata setter and getter
1071 DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag);
1072 DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag);
1073 DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadataKeyValue(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, const char *value);
1074 
1075 // helpers
1076 DLL_API unsigned DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
1077 DLL_API BOOL DLL_CALLCONV FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src);
1078 
1079 // tag to C string conversion
1080 DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make FI_DEFAULT(NULL));
1081 
1082 // --------------------------------------------------------------------------
1083 // JPEG lossless transformation routines
1084 // --------------------------------------------------------------------------
1085 /* Debian: The JPEGTransform functions are deliberately disabled in our build
1086  of FreeImage, since they require usage of the vendored copy of libjpeg. */
1087 #if 0
1088 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));
1089 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));
1090 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
1091 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);
1092 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));
1093 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));
1094 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));
1095 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));
1096 #endif
1097 
1098 
1099 // --------------------------------------------------------------------------
1100 // Image manipulation toolkit
1101 // --------------------------------------------------------------------------
1102 
1103 // rotation and flipping
1105 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib, double angle);
1106 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor FI_DEFAULT(NULL));
1107 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);
1108 DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib);
1109 DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib);
1110 
1111 // upsampling / downsampling
1112 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter FI_DEFAULT(FILTER_CATMULLROM));
1113 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
1114 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));
1115 
1116 // color manipulation routines (point operations)
1117 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
1118 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib, double gamma);
1119 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib, double percentage);
1120 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib, double percentage);
1121 DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib);
1122 DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK));
1123 DLL_API int DLL_CALLCONV FreeImage_GetAdjustColorsLookupTable(BYTE *LUT, double brightness, double contrast, double gamma, BOOL invert);
1124 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustColors(FIBITMAP *dib, double brightness, double contrast, double gamma, BOOL invert FI_DEFAULT(FALSE));
1125 DLL_API unsigned DLL_CALLCONV FreeImage_ApplyColorMapping(FIBITMAP *dib, RGBQUAD *srccolors, RGBQUAD *dstcolors, unsigned count, BOOL ignore_alpha, BOOL swap);
1126 DLL_API unsigned DLL_CALLCONV FreeImage_SwapColors(FIBITMAP *dib, RGBQUAD *color_a, RGBQUAD *color_b, BOOL ignore_alpha);
1127 DLL_API unsigned DLL_CALLCONV FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices, BYTE *dstindices, unsigned count, BOOL swap);
1128 DLL_API unsigned DLL_CALLCONV FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b);
1129 
1130 // channel processing routines
1131 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
1132 DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
1133 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
1134 DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
1135 
1136 // copy / paste / composite routines
1137 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, int left, int top, int right, int bottom);
1138 DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);
1139 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_CreateView(FIBITMAP *dib, unsigned left, unsigned top, unsigned right, unsigned bottom);
1140 
1141 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
1142 DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib);
1143 
1144 // background filling routines
1145 DLL_API BOOL DLL_CALLCONV FreeImage_FillBackground(FIBITMAP *dib, const void *color, int options FI_DEFAULT(0));
1146 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));
1147 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));
1148 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));
1149 
1150 // miscellaneous algorithms
1151 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian, int ncycle FI_DEFAULT(3));
1152 
1153 // restore the borland-specific enum size option
1154 #if defined(__BORLANDC__)
1155 #pragma option pop
1156 #endif
1157 
1158 #ifdef __cplusplus
1159 }
1160 #endif
1161 
1162 #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