1 // ==========================================================
\r
4 // Design and implementation by
\r
5 // - Floris van den Berg (flvdberg@wxs.nl)
\r
6 // - Hervé Drolon (drolon@infonie.fr)
\r
9 // - see changes log named 'Whatsnew.txt', see header of each .h and .cpp file
\r
11 // This file is part of FreeImage 3
\r
13 // COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
\r
14 // OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
\r
15 // THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
\r
16 // OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
\r
17 // CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
\r
18 // THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
\r
19 // SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
\r
20 // PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
\r
23 // Use at your own risk!
\r
24 // ==========================================================
\r
29 // Version information ------------------------------------------------------
\r
31 #define FREEIMAGE_MAJOR_VERSION 3
\r
32 #define FREEIMAGE_MINOR_VERSION 15
\r
33 #define FREEIMAGE_RELEASE_SERIAL 4
\r
35 // Compiler options ---------------------------------------------------------
\r
37 #include <wchar.h> // needed for UNICODE functions
\r
39 #if defined(FREEIMAGE_LIB)
\r
41 #define DLL_CALLCONV
\r
43 #if defined(_WIN32) || defined(__WIN32__)
\r
44 #define DLL_CALLCONV __stdcall
\r
45 // The following ifdef block is the standard way of creating macros which make exporting
\r
46 // from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS
\r
47 // symbol defined on the command line. this symbol should not be defined on any project
\r
48 // that uses this DLL. This way any other project whose source files include this file see
\r
49 // DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
\r
50 // defined with this macro as being exported.
\r
51 #ifdef FREEIMAGE_EXPORTS
\r
52 #define DLL_API __declspec(dllexport)
\r
54 #define DLL_API __declspec(dllimport)
\r
55 #endif // FREEIMAGE_EXPORTS
\r
57 // try the gcc visibility support (see http://gcc.gnu.org/wiki/Visibility)
\r
58 #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
\r
59 #ifndef GCC_HASCLASSVISIBILITY
\r
60 #define GCC_HASCLASSVISIBILITY
\r
63 #define DLL_CALLCONV
\r
64 #if defined(GCC_HASCLASSVISIBILITY)
\r
65 #define DLL_API __attribute__ ((visibility("default")))
\r
69 #endif // WIN32 / !WIN32
\r
70 #endif // FREEIMAGE_LIB
\r
72 // Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined
\r
73 // If your big endian system isn't being detected, add an OS specific check
\r
74 #if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \
\r
75 (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \
\r
76 defined(__BIG_ENDIAN__)
\r
77 #define FREEIMAGE_BIGENDIAN
\r
78 #endif // BYTE_ORDER
\r
80 // This really only affects 24 and 32 bit formats, the rest are always RGB order.
\r
81 #define FREEIMAGE_COLORORDER_BGR 0
\r
82 #define FREEIMAGE_COLORORDER_RGB 1
\r
83 #if defined(FREEIMAGE_BIGENDIAN)
\r
84 #define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_RGB
\r
86 #define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_BGR
\r
89 // Ensure 4-byte enums if we're using Borland C++ compilers
\r
90 #if defined(__BORLANDC__)
\r
91 #pragma option push -b
\r
94 // For C compatibility --------------------------------------------------------
\r
97 #define FI_DEFAULT(x) = x
\r
98 #define FI_ENUM(x) enum x
\r
99 #define FI_STRUCT(x) struct x
\r
101 #define FI_DEFAULT(x)
\r
102 #define FI_ENUM(x) typedef int x; enum x
\r
103 #define FI_STRUCT(x) typedef struct x x; struct x
\r
106 // Bitmap types -------------------------------------------------------------
\r
108 FI_STRUCT (FIBITMAP) { void *data; };
\r
109 FI_STRUCT (FIMULTIBITMAP) { void *data; };
\r
111 // Types used in the library (directly copied from Windows) -----------------
\r
113 #if defined(__MINGW32__) && defined(_WINDOWS_H)
\r
114 #define _WINDOWS_ // prevent a bug in MinGW32
\r
115 #endif // __MINGW32__
\r
137 // define portable types for 32-bit / 64-bit OS
\r
138 #include <inttypes.h>
\r
139 typedef int32_t BOOL;
\r
140 typedef uint8_t BYTE;
\r
141 typedef uint16_t WORD;
\r
142 typedef uint32_t DWORD;
\r
143 typedef int32_t LONG;
\r
144 typedef int64_t INT64;
\r
145 typedef uint64_t UINT64;
\r
147 // MS is not C99 ISO compliant
\r
149 typedef unsigned char BYTE;
\r
150 typedef unsigned short WORD;
\r
151 typedef unsigned long DWORD;
\r
153 typedef signed __int64 INT64;
\r
154 typedef unsigned __int64 UINT64;
\r
157 #if (defined(_WIN32) || defined(__WIN32__))
\r
158 #pragma pack(push, 1)
\r
163 typedef struct tagRGBQUAD {
\r
164 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
\r
172 #endif // FREEIMAGE_COLORORDER
\r
176 typedef struct tagRGBTRIPLE {
\r
177 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
\r
185 #endif // FREEIMAGE_COLORORDER
\r
188 #if (defined(_WIN32) || defined(__WIN32__))
\r
194 typedef struct tagBITMAPINFOHEADER{
\r
200 DWORD biCompression;
\r
201 DWORD biSizeImage;
\r
202 LONG biXPelsPerMeter;
\r
203 LONG biYPelsPerMeter;
\r
205 DWORD biClrImportant;
\r
206 } BITMAPINFOHEADER, *PBITMAPINFOHEADER;
\r
208 typedef struct tagBITMAPINFO {
\r
209 BITMAPINFOHEADER bmiHeader;
\r
210 RGBQUAD bmiColors[1];
\r
211 } BITMAPINFO, *PBITMAPINFO;
\r
213 #endif // _WINDOWS_
\r
215 // Types used in the library (specific to FreeImage) ------------------------
\r
217 #if (defined(_WIN32) || defined(__WIN32__))
\r
218 #pragma pack(push, 1)
\r
225 typedef struct tagFIRGB16 {
\r
233 typedef struct tagFIRGBA16 {
\r
240 /** 96-bit RGB Float
\r
242 typedef struct tagFIRGBF {
\r
248 /** 128-bit RGBA Float
\r
250 typedef struct tagFIRGBAF {
\r
257 /** Data structure for COMPLEX type (complex number)
\r
259 typedef struct tagFICOMPLEX {
\r
266 #if (defined(_WIN32) || defined(__WIN32__))
\r
272 // Indexes for byte arrays, masks and shifts for treating pixels as words ---
\r
273 // These coincide with the order of RGBQUAD and RGBTRIPLE -------------------
\r
275 #ifndef FREEIMAGE_BIGENDIAN
\r
276 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
\r
277 // Little Endian (x86 / MS Windows, Linux) : BGR(A) order
\r
278 #define FI_RGBA_RED 2
\r
279 #define FI_RGBA_GREEN 1
\r
280 #define FI_RGBA_BLUE 0
\r
281 #define FI_RGBA_ALPHA 3
\r
282 #define FI_RGBA_RED_MASK 0x00FF0000
\r
283 #define FI_RGBA_GREEN_MASK 0x0000FF00
\r
284 #define FI_RGBA_BLUE_MASK 0x000000FF
\r
285 #define FI_RGBA_ALPHA_MASK 0xFF000000
\r
286 #define FI_RGBA_RED_SHIFT 16
\r
287 #define FI_RGBA_GREEN_SHIFT 8
\r
288 #define FI_RGBA_BLUE_SHIFT 0
\r
289 #define FI_RGBA_ALPHA_SHIFT 24
\r
291 // Little Endian (x86 / MaxOSX) : RGB(A) order
\r
292 #define FI_RGBA_RED 0
\r
293 #define FI_RGBA_GREEN 1
\r
294 #define FI_RGBA_BLUE 2
\r
295 #define FI_RGBA_ALPHA 3
\r
296 #define FI_RGBA_RED_MASK 0x000000FF
\r
297 #define FI_RGBA_GREEN_MASK 0x0000FF00
\r
298 #define FI_RGBA_BLUE_MASK 0x00FF0000
\r
299 #define FI_RGBA_ALPHA_MASK 0xFF000000
\r
300 #define FI_RGBA_RED_SHIFT 0
\r
301 #define FI_RGBA_GREEN_SHIFT 8
\r
302 #define FI_RGBA_BLUE_SHIFT 16
\r
303 #define FI_RGBA_ALPHA_SHIFT 24
\r
304 #endif // FREEIMAGE_COLORORDER
\r
306 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
\r
307 // Big Endian (PPC / none) : BGR(A) order
\r
308 #define FI_RGBA_RED 2
\r
309 #define FI_RGBA_GREEN 1
\r
310 #define FI_RGBA_BLUE 0
\r
311 #define FI_RGBA_ALPHA 3
\r
312 #define FI_RGBA_RED_MASK 0x0000FF00
\r
313 #define FI_RGBA_GREEN_MASK 0x00FF0000
\r
314 #define FI_RGBA_BLUE_MASK 0xFF000000
\r
315 #define FI_RGBA_ALPHA_MASK 0x000000FF
\r
316 #define FI_RGBA_RED_SHIFT 8
\r
317 #define FI_RGBA_GREEN_SHIFT 16
\r
318 #define FI_RGBA_BLUE_SHIFT 24
\r
319 #define FI_RGBA_ALPHA_SHIFT 0
\r
321 // Big Endian (PPC / Linux, MaxOSX) : RGB(A) order
\r
322 #define FI_RGBA_RED 0
\r
323 #define FI_RGBA_GREEN 1
\r
324 #define FI_RGBA_BLUE 2
\r
325 #define FI_RGBA_ALPHA 3
\r
326 #define FI_RGBA_RED_MASK 0xFF000000
\r
327 #define FI_RGBA_GREEN_MASK 0x00FF0000
\r
328 #define FI_RGBA_BLUE_MASK 0x0000FF00
\r
329 #define FI_RGBA_ALPHA_MASK 0x000000FF
\r
330 #define FI_RGBA_RED_SHIFT 24
\r
331 #define FI_RGBA_GREEN_SHIFT 16
\r
332 #define FI_RGBA_BLUE_SHIFT 8
\r
333 #define FI_RGBA_ALPHA_SHIFT 0
\r
334 #endif // FREEIMAGE_COLORORDER
\r
335 #endif // FREEIMAGE_BIGENDIAN
\r
337 #define FI_RGBA_RGB_MASK (FI_RGBA_RED_MASK|FI_RGBA_GREEN_MASK|FI_RGBA_BLUE_MASK)
\r
339 // The 16bit macros only include masks and shifts, since each color element is not byte aligned
\r
341 #define FI16_555_RED_MASK 0x7C00
\r
342 #define FI16_555_GREEN_MASK 0x03E0
\r
343 #define FI16_555_BLUE_MASK 0x001F
\r
344 #define FI16_555_RED_SHIFT 10
\r
345 #define FI16_555_GREEN_SHIFT 5
\r
346 #define FI16_555_BLUE_SHIFT 0
\r
347 #define FI16_565_RED_MASK 0xF800
\r
348 #define FI16_565_GREEN_MASK 0x07E0
\r
349 #define FI16_565_BLUE_MASK 0x001F
\r
350 #define FI16_565_RED_SHIFT 11
\r
351 #define FI16_565_GREEN_SHIFT 5
\r
352 #define FI16_565_BLUE_SHIFT 0
\r
354 // ICC profile support ------------------------------------------------------
\r
356 #define FIICC_DEFAULT 0x00
\r
357 #define FIICC_COLOR_IS_CMYK 0x01
\r
359 FI_STRUCT (FIICCPROFILE) {
\r
360 WORD flags; // info flag
\r
361 DWORD size; // profile's size measured in bytes
\r
362 void *data; // points to a block of contiguous memory containing the profile
\r
365 // Important enums ----------------------------------------------------------
\r
367 /** I/O image format identifiers.
\r
369 FI_ENUM(FREE_IMAGE_FORMAT) {
\r
409 /** Image type used in FreeImage.
\r
411 FI_ENUM(FREE_IMAGE_TYPE) {
\r
412 FIT_UNKNOWN = 0, // unknown type
\r
413 FIT_BITMAP = 1, // standard image : 1-, 4-, 8-, 16-, 24-, 32-bit
\r
414 FIT_UINT16 = 2, // array of unsigned short : unsigned 16-bit
\r
415 FIT_INT16 = 3, // array of short : signed 16-bit
\r
416 FIT_UINT32 = 4, // array of unsigned long : unsigned 32-bit
\r
417 FIT_INT32 = 5, // array of long : signed 32-bit
\r
418 FIT_FLOAT = 6, // array of float : 32-bit IEEE floating point
\r
419 FIT_DOUBLE = 7, // array of double : 64-bit IEEE floating point
\r
420 FIT_COMPLEX = 8, // array of FICOMPLEX : 2 x 64-bit IEEE floating point
\r
421 FIT_RGB16 = 9, // 48-bit RGB image : 3 x 16-bit
\r
422 FIT_RGBA16 = 10, // 64-bit RGBA image : 4 x 16-bit
\r
423 FIT_RGBF = 11, // 96-bit RGB float image : 3 x 32-bit IEEE floating point
\r
424 FIT_RGBAF = 12 // 128-bit RGBA float image : 4 x 32-bit IEEE floating point
\r
427 /** Image color type used in FreeImage.
\r
429 FI_ENUM(FREE_IMAGE_COLOR_TYPE) {
\r
430 FIC_MINISWHITE = 0, // min value is white
\r
431 FIC_MINISBLACK = 1, // min value is black
\r
432 FIC_RGB = 2, // RGB color model
\r
433 FIC_PALETTE = 3, // color map indexed
\r
434 FIC_RGBALPHA = 4, // RGB color model with alpha channel
\r
435 FIC_CMYK = 5 // CMYK color model
\r
438 /** Color quantization algorithms.
\r
439 Constants used in FreeImage_ColorQuantize.
\r
441 FI_ENUM(FREE_IMAGE_QUANTIZE) {
\r
442 FIQ_WUQUANT = 0, // Xiaolin Wu color quantization algorithm
\r
443 FIQ_NNQUANT = 1 // NeuQuant neural-net quantization algorithm by Anthony Dekker
\r
446 /** Dithering algorithms.
\r
447 Constants used in FreeImage_Dither.
\r
449 FI_ENUM(FREE_IMAGE_DITHER) {
\r
450 FID_FS = 0, // Floyd & Steinberg error diffusion
\r
451 FID_BAYER4x4 = 1, // Bayer ordered dispersed dot dithering (order 2 dithering matrix)
\r
452 FID_BAYER8x8 = 2, // Bayer ordered dispersed dot dithering (order 3 dithering matrix)
\r
453 FID_CLUSTER6x6 = 3, // Ordered clustered dot dithering (order 3 - 6x6 matrix)
\r
454 FID_CLUSTER8x8 = 4, // Ordered clustered dot dithering (order 4 - 8x8 matrix)
\r
455 FID_CLUSTER16x16= 5, // Ordered clustered dot dithering (order 8 - 16x16 matrix)
\r
456 FID_BAYER16x16 = 6 // Bayer ordered dispersed dot dithering (order 4 dithering matrix)
\r
459 /** Lossless JPEG transformations
\r
460 Constants used in FreeImage_JPEGTransform
\r
462 FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
\r
463 FIJPEG_OP_NONE = 0, // no transformation
\r
464 FIJPEG_OP_FLIP_H = 1, // horizontal flip
\r
465 FIJPEG_OP_FLIP_V = 2, // vertical flip
\r
466 FIJPEG_OP_TRANSPOSE = 3, // transpose across UL-to-LR axis
\r
467 FIJPEG_OP_TRANSVERSE = 4, // transpose across UR-to-LL axis
\r
468 FIJPEG_OP_ROTATE_90 = 5, // 90-degree clockwise rotation
\r
469 FIJPEG_OP_ROTATE_180 = 6, // 180-degree rotation
\r
470 FIJPEG_OP_ROTATE_270 = 7 // 270-degree clockwise (or 90 ccw)
\r
473 /** Tone mapping operators.
\r
474 Constants used in FreeImage_ToneMapping.
\r
476 FI_ENUM(FREE_IMAGE_TMO) {
\r
477 FITMO_DRAGO03 = 0, // Adaptive logarithmic mapping (F. Drago, 2003)
\r
478 FITMO_REINHARD05 = 1, // Dynamic range reduction inspired by photoreceptor physiology (E. Reinhard, 2005)
\r
479 FITMO_FATTAL02 = 2 // Gradient domain high dynamic range compression (R. Fattal, 2002)
\r
482 /** Upsampling / downsampling filters.
\r
483 Constants used in FreeImage_Rescale.
\r
485 FI_ENUM(FREE_IMAGE_FILTER) {
\r
486 FILTER_BOX = 0, // Box, pulse, Fourier window, 1st order (constant) b-spline
\r
487 FILTER_BICUBIC = 1, // Mitchell & Netravali's two-param cubic filter
\r
488 FILTER_BILINEAR = 2, // Bilinear filter
\r
489 FILTER_BSPLINE = 3, // 4th order (cubic) b-spline
\r
490 FILTER_CATMULLROM = 4, // Catmull-Rom spline, Overhauser spline
\r
491 FILTER_LANCZOS3 = 5 // Lanczos3 filter
\r
494 /** Color channels.
\r
495 Constants used in color manipulation routines.
\r
497 FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) {
\r
498 FICC_RGB = 0, // Use red, green and blue channels
\r
499 FICC_RED = 1, // Use red channel
\r
500 FICC_GREEN = 2, // Use green channel
\r
501 FICC_BLUE = 3, // Use blue channel
\r
502 FICC_ALPHA = 4, // Use alpha channel
\r
503 FICC_BLACK = 5, // Use black channel
\r
504 FICC_REAL = 6, // Complex images: use real part
\r
505 FICC_IMAG = 7, // Complex images: use imaginary part
\r
506 FICC_MAG = 8, // Complex images: use magnitude
\r
507 FICC_PHASE = 9 // Complex images: use phase
\r
510 // Metadata support ---------------------------------------------------------
\r
513 Tag data type information (based on TIFF specifications)
\r
515 Note: RATIONALs are the ratio of two 32-bit integer values.
\r
517 FI_ENUM(FREE_IMAGE_MDTYPE) {
\r
518 FIDT_NOTYPE = 0, // placeholder
\r
519 FIDT_BYTE = 1, // 8-bit unsigned integer
\r
520 FIDT_ASCII = 2, // 8-bit bytes w/ last byte null
\r
521 FIDT_SHORT = 3, // 16-bit unsigned integer
\r
522 FIDT_LONG = 4, // 32-bit unsigned integer
\r
523 FIDT_RATIONAL = 5, // 64-bit unsigned fraction
\r
524 FIDT_SBYTE = 6, // 8-bit signed integer
\r
525 FIDT_UNDEFINED = 7, // 8-bit untyped data
\r
526 FIDT_SSHORT = 8, // 16-bit signed integer
\r
527 FIDT_SLONG = 9, // 32-bit signed integer
\r
528 FIDT_SRATIONAL = 10, // 64-bit signed fraction
\r
529 FIDT_FLOAT = 11, // 32-bit IEEE floating point
\r
530 FIDT_DOUBLE = 12, // 64-bit IEEE floating point
\r
531 FIDT_IFD = 13, // 32-bit unsigned integer (offset)
\r
532 FIDT_PALETTE = 14, // 32-bit RGBQUAD
\r
533 FIDT_LONG8 = 16, // 64-bit unsigned integer
\r
534 FIDT_SLONG8 = 17, // 64-bit signed integer
\r
535 FIDT_IFD8 = 18 // 64-bit unsigned integer (offset)
\r
539 Metadata models supported by FreeImage
\r
541 FI_ENUM(FREE_IMAGE_MDMODEL) {
\r
543 FIMD_COMMENTS = 0, // single comment or keywords
\r
544 FIMD_EXIF_MAIN = 1, // Exif-TIFF metadata
\r
545 FIMD_EXIF_EXIF = 2, // Exif-specific metadata
\r
546 FIMD_EXIF_GPS = 3, // Exif GPS metadata
\r
547 FIMD_EXIF_MAKERNOTE = 4, // Exif maker note metadata
\r
548 FIMD_EXIF_INTEROP = 5, // Exif interoperability metadata
\r
549 FIMD_IPTC = 6, // IPTC/NAA metadata
\r
550 FIMD_XMP = 7, // Abobe XMP metadata
\r
551 FIMD_GEOTIFF = 8, // GeoTIFF metadata
\r
552 FIMD_ANIMATION = 9, // Animation metadata
\r
553 FIMD_CUSTOM = 10, // Used to attach other metadata types to a dib
\r
554 FIMD_EXIF_RAW = 11 // Exif metadata as a raw buffer
\r
558 Handle to a metadata model
\r
560 FI_STRUCT (FIMETADATA) { void *data; };
\r
563 Handle to a FreeImage tag
\r
565 FI_STRUCT (FITAG) { void *data; };
\r
567 // File IO routines ---------------------------------------------------------
\r
569 #ifndef FREEIMAGE_IO
\r
570 #define FREEIMAGE_IO
\r
572 typedef void* fi_handle;
\r
573 typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
\r
574 typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);
\r
575 typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin);
\r
576 typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);
\r
578 #if (defined(_WIN32) || defined(__WIN32__))
\r
579 #pragma pack(push, 1)
\r
584 FI_STRUCT(FreeImageIO) {
\r
585 FI_ReadProc read_proc; // pointer to the function used to read data
\r
586 FI_WriteProc write_proc; // pointer to the function used to write data
\r
587 FI_SeekProc seek_proc; // pointer to the function used to seek
\r
588 FI_TellProc tell_proc; // pointer to the function used to aquire the current position
\r
591 #if (defined(_WIN32) || defined(__WIN32__))
\r
598 Handle to a memory I/O stream
\r
600 FI_STRUCT (FIMEMORY) { void *data; };
\r
602 #endif // FREEIMAGE_IO
\r
604 // Plugin routines ----------------------------------------------------------
\r
609 typedef const char *(DLL_CALLCONV *FI_FormatProc)(void);
\r
610 typedef const char *(DLL_CALLCONV *FI_DescriptionProc)(void);
\r
611 typedef const char *(DLL_CALLCONV *FI_ExtensionListProc)(void);
\r
612 typedef const char *(DLL_CALLCONV *FI_RegExprProc)(void);
\r
613 typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);
\r
614 typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, void *data);
\r
615 typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, void *data);
\r
616 typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, void *data);
\r
617 typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle, int page, int flags, void *data);
\r
618 typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data);
\r
619 typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle);
\r
620 typedef const char *(DLL_CALLCONV *FI_MimeProc)(void);
\r
621 typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(int bpp);
\r
622 typedef BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type);
\r
623 typedef BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)(void);
\r
624 typedef BOOL (DLL_CALLCONV *FI_SupportsNoPixelsProc)(void);
\r
626 FI_STRUCT (Plugin) {
\r
627 FI_FormatProc format_proc;
\r
628 FI_DescriptionProc description_proc;
\r
629 FI_ExtensionListProc extension_proc;
\r
630 FI_RegExprProc regexpr_proc;
\r
631 FI_OpenProc open_proc;
\r
632 FI_CloseProc close_proc;
\r
633 FI_PageCountProc pagecount_proc;
\r
634 FI_PageCapabilityProc pagecapability_proc;
\r
635 FI_LoadProc load_proc;
\r
636 FI_SaveProc save_proc;
\r
637 FI_ValidateProc validate_proc;
\r
638 FI_MimeProc mime_proc;
\r
639 FI_SupportsExportBPPProc supports_export_bpp_proc;
\r
640 FI_SupportsExportTypeProc supports_export_type_proc;
\r
641 FI_SupportsICCProfilesProc supports_icc_profiles_proc;
\r
642 FI_SupportsNoPixelsProc supports_no_pixels_proc;
\r
645 typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id);
\r
650 // Load / Save flag constants -----------------------------------------------
\r
652 #define FIF_LOAD_NOPIXELS 0x8000 // loading: load the image header only (not supported by all plugins, default to full loading)
\r
654 #define BMP_DEFAULT 0
\r
655 #define BMP_SAVE_RLE 1
\r
656 #define CUT_DEFAULT 0
\r
657 #define DDS_DEFAULT 0
\r
658 #define EXR_DEFAULT 0 // save data as half with piz-based wavelet compression
\r
659 #define EXR_FLOAT 0x0001 // save data as float instead of as half (not recommended)
\r
660 #define EXR_NONE 0x0002 // save with no compression
\r
661 #define EXR_ZIP 0x0004 // save with zlib compression, in blocks of 16 scan lines
\r
662 #define EXR_PIZ 0x0008 // save with piz-based wavelet compression
\r
663 #define EXR_PXR24 0x0010 // save with lossy 24-bit float compression
\r
664 #define EXR_B44 0x0020 // save with lossy 44% float compression - goes to 22% when combined with EXR_LC
\r
665 #define EXR_LC 0x0040 // save images with one luminance and two chroma channels, rather than as RGB (lossy compression)
\r
666 #define FAXG3_DEFAULT 0
\r
667 #define GIF_DEFAULT 0
\r
668 #define GIF_LOAD256 1 // Load the image as a 256 color image with ununsed palette entries, if it's 16 or 2 color
\r
669 #define GIF_PLAYBACK 2 // 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading
\r
670 #define HDR_DEFAULT 0
\r
671 #define ICO_DEFAULT 0
\r
672 #define ICO_MAKEALPHA 1 // convert to 32bpp and create an alpha channel from the AND-mask when loading
\r
673 #define IFF_DEFAULT 0
\r
674 #define J2K_DEFAULT 0 // save with a 16:1 rate
\r
675 #define JP2_DEFAULT 0 // save with a 16:1 rate
\r
676 #define JPEG_DEFAULT 0 // loading (see JPEG_FAST); saving (see JPEG_QUALITYGOOD|JPEG_SUBSAMPLING_420)
\r
677 #define JPEG_FAST 0x0001 // load the file as fast as possible, sacrificing some quality
\r
678 #define JPEG_ACCURATE 0x0002 // load the file with the best quality, sacrificing some speed
\r
679 #define JPEG_CMYK 0x0004 // load separated CMYK "as is" (use | to combine with other load flags)
\r
680 #define JPEG_EXIFROTATE 0x0008 // load and rotate according to Exif 'Orientation' tag if available
\r
681 #define JPEG_GREYSCALE 0x0010 // load and convert to a 8-bit greyscale image
\r
682 #define JPEG_QUALITYSUPERB 0x80 // save with superb quality (100:1)
\r
683 #define JPEG_QUALITYGOOD 0x0100 // save with good quality (75:1)
\r
684 #define JPEG_QUALITYNORMAL 0x0200 // save with normal quality (50:1)
\r
685 #define JPEG_QUALITYAVERAGE 0x0400 // save with average quality (25:1)
\r
686 #define JPEG_QUALITYBAD 0x0800 // save with bad quality (10:1)
\r
687 #define JPEG_PROGRESSIVE 0x2000 // save as a progressive-JPEG (use | to combine with other save flags)
\r
688 #define JPEG_SUBSAMPLING_411 0x1000 // save with high 4x1 chroma subsampling (4:1:1)
\r
689 #define JPEG_SUBSAMPLING_420 0x4000 // save with medium 2x2 medium chroma subsampling (4:2:0) - default value
\r
690 #define JPEG_SUBSAMPLING_422 0x8000 // save with low 2x1 chroma subsampling (4:2:2)
\r
691 #define JPEG_SUBSAMPLING_444 0x10000 // save with no chroma subsampling (4:4:4)
\r
692 #define JPEG_OPTIMIZE 0x20000 // on saving, compute optimal Huffman coding tables (can reduce a few percent of file size)
\r
693 #define JPEG_BASELINE 0x40000 // save basic JPEG, without metadata or any markers
\r
694 #define KOALA_DEFAULT 0
\r
695 #define LBM_DEFAULT 0
\r
696 #define MNG_DEFAULT 0
\r
697 #define PCD_DEFAULT 0
\r
698 #define PCD_BASE 1 // load the bitmap sized 768 x 512
\r
699 #define PCD_BASEDIV4 2 // load the bitmap sized 384 x 256
\r
700 #define PCD_BASEDIV16 3 // load the bitmap sized 192 x 128
\r
701 #define PCX_DEFAULT 0
\r
702 #define PFM_DEFAULT 0
\r
703 #define PICT_DEFAULT 0
\r
704 #define PNG_DEFAULT 0
\r
705 #define PNG_IGNOREGAMMA 1 // loading: avoid gamma correction
\r
706 #define PNG_Z_BEST_SPEED 0x0001 // save using ZLib level 1 compression flag (default value is 6)
\r
707 #define PNG_Z_DEFAULT_COMPRESSION 0x0006 // save using ZLib level 6 compression flag (default recommended value)
\r
708 #define PNG_Z_BEST_COMPRESSION 0x0009 // save using ZLib level 9 compression flag (default value is 6)
\r
709 #define PNG_Z_NO_COMPRESSION 0x0100 // save without ZLib compression
\r
710 #define PNG_INTERLACED 0x0200 // save using Adam7 interlacing (use | to combine with other save flags)
\r
711 #define PNM_DEFAULT 0
\r
712 #define PNM_SAVE_RAW 0 // If set the writer saves in RAW format (i.e. P4, P5 or P6)
\r
713 #define PNM_SAVE_ASCII 1 // If set the writer saves in ASCII format (i.e. P1, P2 or P3)
\r
714 #define PSD_DEFAULT 0
\r
715 #define PSD_CMYK 1 // reads tags for separated CMYK (default is conversion to RGB)
\r
716 #define PSD_LAB 2 // reads tags for CIELab (default is conversion to RGB)
\r
717 #define RAS_DEFAULT 0
\r
718 #define RAW_DEFAULT 0 // load the file as linear RGB 48-bit
\r
719 #define RAW_PREVIEW 1 // try to load the embedded JPEG preview with included Exif Data or default to RGB 24-bit
\r
720 #define RAW_DISPLAY 2 // load the file as RGB 24-bit
\r
721 #define RAW_HALFSIZE 4 // output a half-size color image
\r
722 #define SGI_DEFAULT 0
\r
723 #define TARGA_DEFAULT 0
\r
724 #define TARGA_LOAD_RGB888 1 // If set the loader converts RGB555 and ARGB8888 -> RGB888.
\r
725 #define TARGA_SAVE_RLE 2 // If set, the writer saves with RLE compression
\r
726 #define TIFF_DEFAULT 0
\r
727 #define TIFF_CMYK 0x0001 // reads/stores tags for separated CMYK (use | to combine with compression flags)
\r
728 #define TIFF_PACKBITS 0x0100 // save using PACKBITS compression
\r
729 #define TIFF_DEFLATE 0x0200 // save using DEFLATE compression (a.k.a. ZLIB compression)
\r
730 #define TIFF_ADOBE_DEFLATE 0x0400 // save using ADOBE DEFLATE compression
\r
731 #define TIFF_NONE 0x0800 // save without any compression
\r
732 #define TIFF_CCITTFAX3 0x1000 // save using CCITT Group 3 fax encoding
\r
733 #define TIFF_CCITTFAX4 0x2000 // save using CCITT Group 4 fax encoding
\r
734 #define TIFF_LZW 0x4000 // save using LZW compression
\r
735 #define TIFF_JPEG 0x8000 // save using JPEG compression
\r
736 #define TIFF_LOGLUV 0x10000 // save using LogLuv compression
\r
737 #define WBMP_DEFAULT 0
\r
738 #define XBM_DEFAULT 0
\r
739 #define XPM_DEFAULT 0
\r
741 // Background filling options ---------------------------------------------------------
\r
742 // Constants used in FreeImage_FillBackground and FreeImage_EnlargeCanvas
\r
744 #define FI_COLOR_IS_RGB_COLOR 0x00 // RGBQUAD color is a RGB color (contains no valid alpha channel)
\r
745 #define FI_COLOR_IS_RGBA_COLOR 0x01 // RGBQUAD color is a RGBA color (contains a valid alpha channel)
\r
746 #define FI_COLOR_FIND_EQUAL_COLOR 0x02 // For palettized images: lookup equal RGB color from palette
\r
747 #define FI_COLOR_ALPHA_IS_INDEX 0x04 // The color's rgbReserved member (alpha) contains the palette index to be used
\r
748 #define FI_COLOR_PALETTE_SEARCH_MASK (FI_COLOR_FIND_EQUAL_COLOR | FI_COLOR_ALPHA_IS_INDEX) // No color lookup is performed
\r
755 // Init / Error routines ----------------------------------------------------
\r
757 DLL_API void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE));
\r
758 DLL_API void DLL_CALLCONV FreeImage_DeInitialise(void);
\r
760 // Version routines ---------------------------------------------------------
\r
762 DLL_API const char *DLL_CALLCONV FreeImage_GetVersion(void);
\r
763 DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void);
\r
765 // Message output functions -------------------------------------------------
\r
767 typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg);
\r
768 typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, const char *msg);
\r
770 DLL_API void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf);
\r
771 DLL_API void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf);
\r
772 DLL_API void DLL_CALLCONV FreeImage_OutputMessageProc(int fif, const char *fmt, ...);
\r
774 // Allocate / Clone / Unload routines ---------------------------------------
\r
776 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));
\r
777 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));
\r
778 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib);
\r
779 DLL_API void DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib);
\r
781 // Header loading routines
\r
782 DLL_API BOOL DLL_CALLCONV FreeImage_HasPixels(FIBITMAP *dib);
\r
784 // Load / Save routines -----------------------------------------------------
\r
786 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif, const char *filename, int flags FI_DEFAULT(0));
\r
787 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));
\r
788 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
\r
789 DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags FI_DEFAULT(0));
\r
790 DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));
\r
791 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
\r
793 // Memory I/O stream routines -----------------------------------------------
\r
795 DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
\r
796 DLL_API void DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream);
\r
797 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
\r
798 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));
\r
799 DLL_API long DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream);
\r
800 DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin);
\r
801 DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
\r
802 DLL_API unsigned DLL_CALLCONV FreeImage_ReadMemory(void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
\r
803 DLL_API unsigned DLL_CALLCONV FreeImage_WriteMemory(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
\r
805 DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
\r
806 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream, int flags);
\r
808 // Plugin Interface ---------------------------------------------------------
\r
810 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));
\r
811 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));
\r
812 DLL_API int DLL_CALLCONV FreeImage_GetFIFCount(void);
\r
813 DLL_API int DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable);
\r
814 DLL_API int DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif);
\r
815 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(const char *format);
\r
816 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(const char *mime);
\r
817 DLL_API const char *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif);
\r
818 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif);
\r
819 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif);
\r
820 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif);
\r
821 DLL_API const char *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif);
\r
822 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(const char *filename);
\r
823 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(const wchar_t *filename);
\r
824 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif);
\r
825 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif);
\r
826 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, int bpp);
\r
827 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
\r
828 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif);
\r
829 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsNoPixels(FREE_IMAGE_FORMAT fif);
\r
831 // Multipaging interface ----------------------------------------------------
\r
833 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));
\r
834 DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
\r
835 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
\r
836 DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));
\r
837 DLL_API int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap);
\r
838 DLL_API void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data);
\r
839 DLL_API void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data);
\r
840 DLL_API void DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page);
\r
841 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page);
\r
842 DLL_API void DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
\r
843 DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source);
\r
844 DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count);
\r
846 // Filetype request routines ------------------------------------------------
\r
848 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(const char *filename, int size FI_DEFAULT(0));
\r
849 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(const wchar_t *filename, int size FI_DEFAULT(0));
\r
850 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0));
\r
851 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, int size FI_DEFAULT(0));
\r
853 // Image type request routine -----------------------------------------------
\r
855 DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib);
\r
857 // FreeImage helper routines ------------------------------------------------
\r
859 DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void);
\r
860 DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
\r
861 DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
\r
863 // Pixel access routines ----------------------------------------------------
\r
865 DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib);
\r
866 DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib, int scanline);
\r
868 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
\r
869 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
\r
870 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
\r
871 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
\r
873 // DIB info routines --------------------------------------------------------
\r
875 DLL_API unsigned DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib);
\r
876 DLL_API unsigned DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib);
\r
877 DLL_API unsigned DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib);
\r
878 DLL_API unsigned DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib);
\r
879 DLL_API unsigned DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib);
\r
880 DLL_API unsigned DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib);
\r
881 DLL_API unsigned DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib);
\r
882 DLL_API RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib);
\r
884 DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib);
\r
885 DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib);
\r
886 DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib, unsigned res);
\r
887 DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib, unsigned res);
\r
889 DLL_API BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib);
\r
890 DLL_API BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib);
\r
891 DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib);
\r
893 DLL_API unsigned DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib);
\r
894 DLL_API unsigned DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib);
\r
895 DLL_API unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib);
\r
897 DLL_API unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib);
\r
898 DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib);
\r
899 DLL_API void DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled);
\r
900 DLL_API void DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, int count);
\r
901 DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib);
\r
902 DLL_API void DLL_CALLCONV FreeImage_SetTransparentIndex(FIBITMAP *dib, int index);
\r
903 DLL_API int DLL_CALLCONV FreeImage_GetTransparentIndex(FIBITMAP *dib);
\r
905 DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib);
\r
906 DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
\r
907 DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
\r
909 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetThumbnail(FIBITMAP *dib);
\r
910 DLL_API BOOL DLL_CALLCONV FreeImage_SetThumbnail(FIBITMAP *dib, FIBITMAP *thumbnail);
\r
912 // ICC profile routines -----------------------------------------------------
\r
914 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib);
\r
915 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size);
\r
916 DLL_API void DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib);
\r
918 // Line conversion routines -------------------------------------------------
\r
920 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, int width_in_pixels);
\r
921 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
922 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, int width_in_pixels);
\r
923 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, int width_in_pixels);
\r
924 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, int width_in_pixels);
\r
925 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, int width_in_pixels);
\r
926 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, int width_in_pixels);
\r
927 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, int width_in_pixels);
\r
928 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, int width_in_pixels);
\r
929 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, int width_in_pixels);
\r
930 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, int width_in_pixels);
\r
931 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, int width_in_pixels);
\r
932 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
933 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
934 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
935 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, int width_in_pixels);
\r
936 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, int width_in_pixels);
\r
937 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, int width_in_pixels);
\r
938 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
939 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
940 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
941 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, int width_in_pixels);
\r
942 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, int width_in_pixels);
\r
943 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, int width_in_pixels);
\r
944 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
945 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
946 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
947 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, int width_in_pixels);
\r
948 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, int width_in_pixels);
\r
949 DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, int width_in_pixels);
\r
950 DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
951 DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
952 DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);
\r
953 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, int width_in_pixels);
\r
954 DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, int width_in_pixels);
\r
955 DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels);
\r
957 // Smart conversion routines ------------------------------------------------
\r
959 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib);
\r
960 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib);
\r
961 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib);
\r
962 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib);
\r
963 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib);
\r
964 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib);
\r
965 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib);
\r
966 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);
\r
967 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));
\r
968 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T);
\r
969 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
\r
971 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));
\r
972 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));
\r
974 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToFloat(FIBITMAP *dib);
\r
975 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib);
\r
976 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToUINT16(FIBITMAP *dib);
\r
977 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGB16(FIBITMAP *dib);
\r
979 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
\r
980 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
\r
982 // tone mapping operators
\r
983 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));
\r
984 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0));
\r
985 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0));
\r
986 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));
\r
988 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoFattal02(FIBITMAP *src, double color_saturation FI_DEFAULT(0.5), double attenuation FI_DEFAULT(0.85));
\r
990 // ZLib interface -----------------------------------------------------------
\r
992 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
\r
993 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
\r
994 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
\r
995 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
\r
996 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size);
\r
998 // --------------------------------------------------------------------------
\r
999 // Metadata routines --------------------------------------------------------
\r
1000 // --------------------------------------------------------------------------
\r
1002 // tag creation / destruction
\r
1003 DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag(void);
\r
1004 DLL_API void DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag);
\r
1005 DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag);
\r
1007 // tag getters and setters
\r
1008 DLL_API const char *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag);
\r
1009 DLL_API const char *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag);
\r
1010 DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag);
\r
1011 DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag);
\r
1012 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag);
\r
1013 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag);
\r
1014 DLL_API const void *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag);
\r
1016 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag, const char *key);
\r
1017 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag, const char *description);
\r
1018 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD id);
\r
1019 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type);
\r
1020 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count);
\r
1021 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length);
\r
1022 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag, const void *value);
\r
1025 DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
\r
1026 DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag);
\r
1027 DLL_API void DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle);
\r
1029 // metadata setter and getter
\r
1030 DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag);
\r
1031 DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag);
\r
1034 DLL_API unsigned DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
\r
1035 DLL_API BOOL DLL_CALLCONV FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src);
\r
1037 // tag to C string conversion
\r
1038 DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make FI_DEFAULT(NULL));
\r
1040 // --------------------------------------------------------------------------
\r
1041 // Image manipulation toolkit -----------------------------------------------
\r
1042 // --------------------------------------------------------------------------
\r
1044 // rotation and flipping
\r
1045 /// @deprecated see FreeImage_Rotate
\r
1046 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib, double angle);
\r
1047 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor FI_DEFAULT(NULL));
\r
1048 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);
\r
1049 DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib);
\r
1050 DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib);
\r
1051 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE));
\r
1052 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(FALSE));
\r
1054 // upsampling / downsampling
\r
1055 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter);
\r
1056 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
\r
1058 // color manipulation routines (point operations)
\r
1059 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
\r
1060 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib, double gamma);
\r
1061 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib, double percentage);
\r
1062 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib, double percentage);
\r
1063 DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib);
\r
1064 DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK));
\r
1065 DLL_API int DLL_CALLCONV FreeImage_GetAdjustColorsLookupTable(BYTE *LUT, double brightness, double contrast, double gamma, BOOL invert);
\r
1066 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustColors(FIBITMAP *dib, double brightness, double contrast, double gamma, BOOL invert FI_DEFAULT(FALSE));
\r
1067 DLL_API unsigned DLL_CALLCONV FreeImage_ApplyColorMapping(FIBITMAP *dib, RGBQUAD *srccolors, RGBQUAD *dstcolors, unsigned count, BOOL ignore_alpha, BOOL swap);
\r
1068 DLL_API unsigned DLL_CALLCONV FreeImage_SwapColors(FIBITMAP *dib, RGBQUAD *color_a, RGBQUAD *color_b, BOOL ignore_alpha);
\r
1069 DLL_API unsigned DLL_CALLCONV FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices, BYTE *dstindices, unsigned count, BOOL swap);
\r
1070 DLL_API unsigned DLL_CALLCONV FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b);
\r
1072 // channel processing routines
\r
1073 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
\r
1074 DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
\r
1075 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
\r
1076 DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
\r
1078 // copy / paste / composite routines
\r
1079 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, int left, int top, int right, int bottom);
\r
1080 DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);
\r
1081 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
\r
1082 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
\r
1083 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);
\r
1084 DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib);
\r
1086 // background filling routines
\r
1087 DLL_API BOOL DLL_CALLCONV FreeImage_FillBackground(FIBITMAP *dib, const void *color, int options FI_DEFAULT(0));
\r
1088 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));
\r
1089 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));
\r
1090 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));
\r
1092 // miscellaneous algorithms
\r
1093 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian, int ncycle FI_DEFAULT(3));
\r
1095 // restore the borland-specific enum size option
\r
1096 #if defined(__BORLANDC__)
\r
1097 #pragma option pop
\r
1100 #ifdef __cplusplus
\r
1104 #endif // FREEIMAGE_H
\r