31 #define FREEIMAGE_MAJOR_VERSION 3
32 #define FREEIMAGE_MINOR_VERSION 15
33 #define FREEIMAGE_RELEASE_SERIAL 4
39 #if defined(FREEIMAGE_LIB)
43 #if defined(_WIN32) || defined(__WIN32__)
44 #define DLL_CALLCONV __stdcall
51 #ifdef FREEIMAGE_EXPORTS
52 #define DLL_API __declspec(dllexport)
54 #define DLL_API __declspec(dllimport)
55 #endif // FREEIMAGE_EXPORTS
58 #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
59 #ifndef GCC_HASCLASSVISIBILITY
60 #define GCC_HASCLASSVISIBILITY
64 #if defined(GCC_HASCLASSVISIBILITY)
65 #define DLL_API __attribute__ ((visibility("default")))
69 #endif // WIN32 / !WIN32
70 #endif // FREEIMAGE_LIB
74 #if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \
75 (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \
76 defined(__BIG_ENDIAN__)
77 #define FREEIMAGE_BIGENDIAN
81 #define FREEIMAGE_COLORORDER_BGR 0
82 #define FREEIMAGE_COLORORDER_RGB 1
83 #if defined(FREEIMAGE_BIGENDIAN)
84 #define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_RGB
86 #define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_BGR
90 #if defined(__BORLANDC__)
91 #pragma option push -b
97 #define FI_DEFAULT(x) = x
98 #define FI_ENUM(x) enum x
99 #define FI_STRUCT(x) struct x
101 #define FI_DEFAULT(x)
102 #define FI_ENUM(x) typedef int x; enum x
103 #define FI_STRUCT(x) typedef struct x x; struct x
108 FI_STRUCT (FIBITMAP) {
void *data; };
109 FI_STRUCT (FIMULTIBITMAP) {
void *data; };
113 #if defined(__MINGW32__) && defined(_WINDOWS_H)
114 #define _WINDOWS_ // prevent a bug in MinGW32
115 #endif // __MINGW32__
138 #include <inttypes.h>
139 typedef int32_t BOOL;
140 typedef uint8_t BYTE;
141 typedef uint16_t WORD;
142 typedef uint32_t DWORD;
143 typedef int32_t LONG;
144 typedef int64_t INT64;
145 typedef uint64_t UINT64;
149 typedef unsigned char BYTE;
150 typedef unsigned short WORD;
151 typedef unsigned long DWORD;
153 typedef signed __int64 INT64;
154 typedef unsigned __int64 UINT64;
157 #if (defined(_WIN32) || defined(__WIN32__))
158 #pragma pack(push, 1)
164 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
172 #endif // FREEIMAGE_COLORORDER
177 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
185 #endif // FREEIMAGE_COLORORDER
188 #if (defined(_WIN32) || defined(__WIN32__))
202 LONG biXPelsPerMeter;
203 LONG biYPelsPerMeter;
205 DWORD biClrImportant;
217 #if (defined(_WIN32) || defined(__WIN32__))
218 #pragma pack(push, 1)
266 #if (defined(_WIN32) || defined(__WIN32__))
275 #ifndef FREEIMAGE_BIGENDIAN
276 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
278 #define FI_RGBA_RED 2
279 #define FI_RGBA_GREEN 1
280 #define FI_RGBA_BLUE 0
281 #define FI_RGBA_ALPHA 3
282 #define FI_RGBA_RED_MASK 0x00FF0000
283 #define FI_RGBA_GREEN_MASK 0x0000FF00
284 #define FI_RGBA_BLUE_MASK 0x000000FF
285 #define FI_RGBA_ALPHA_MASK 0xFF000000
286 #define FI_RGBA_RED_SHIFT 16
287 #define FI_RGBA_GREEN_SHIFT 8
288 #define FI_RGBA_BLUE_SHIFT 0
289 #define FI_RGBA_ALPHA_SHIFT 24
292 #define FI_RGBA_RED 0
293 #define FI_RGBA_GREEN 1
294 #define FI_RGBA_BLUE 2
295 #define FI_RGBA_ALPHA 3
296 #define FI_RGBA_RED_MASK 0x000000FF
297 #define FI_RGBA_GREEN_MASK 0x0000FF00
298 #define FI_RGBA_BLUE_MASK 0x00FF0000
299 #define FI_RGBA_ALPHA_MASK 0xFF000000
300 #define FI_RGBA_RED_SHIFT 0
301 #define FI_RGBA_GREEN_SHIFT 8
302 #define FI_RGBA_BLUE_SHIFT 16
303 #define FI_RGBA_ALPHA_SHIFT 24
304 #endif // FREEIMAGE_COLORORDER
306 #if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
308 #define FI_RGBA_RED 2
309 #define FI_RGBA_GREEN 1
310 #define FI_RGBA_BLUE 0
311 #define FI_RGBA_ALPHA 3
312 #define FI_RGBA_RED_MASK 0x0000FF00
313 #define FI_RGBA_GREEN_MASK 0x00FF0000
314 #define FI_RGBA_BLUE_MASK 0xFF000000
315 #define FI_RGBA_ALPHA_MASK 0x000000FF
316 #define FI_RGBA_RED_SHIFT 8
317 #define FI_RGBA_GREEN_SHIFT 16
318 #define FI_RGBA_BLUE_SHIFT 24
319 #define FI_RGBA_ALPHA_SHIFT 0
322 #define FI_RGBA_RED 0
323 #define FI_RGBA_GREEN 1
324 #define FI_RGBA_BLUE 2
325 #define FI_RGBA_ALPHA 3
326 #define FI_RGBA_RED_MASK 0xFF000000
327 #define FI_RGBA_GREEN_MASK 0x00FF0000
328 #define FI_RGBA_BLUE_MASK 0x0000FF00
329 #define FI_RGBA_ALPHA_MASK 0x000000FF
330 #define FI_RGBA_RED_SHIFT 24
331 #define FI_RGBA_GREEN_SHIFT 16
332 #define FI_RGBA_BLUE_SHIFT 8
333 #define FI_RGBA_ALPHA_SHIFT 0
334 #endif // FREEIMAGE_COLORORDER
335 #endif // FREEIMAGE_BIGENDIAN
337 #define FI_RGBA_RGB_MASK (FI_RGBA_RED_MASK|FI_RGBA_GREEN_MASK|FI_RGBA_BLUE_MASK)
341 #define FI16_555_RED_MASK 0x7C00
342 #define FI16_555_GREEN_MASK 0x03E0
343 #define FI16_555_BLUE_MASK 0x001F
344 #define FI16_555_RED_SHIFT 10
345 #define FI16_555_GREEN_SHIFT 5
346 #define FI16_555_BLUE_SHIFT 0
347 #define FI16_565_RED_MASK 0xF800
348 #define FI16_565_GREEN_MASK 0x07E0
349 #define FI16_565_BLUE_MASK 0x001F
350 #define FI16_565_RED_SHIFT 11
351 #define FI16_565_GREEN_SHIFT 5
352 #define FI16_565_BLUE_SHIFT 0
356 #define FIICC_DEFAULT 0x00
357 #define FIICC_COLOR_IS_CMYK 0x01
359 FI_STRUCT (FIICCPROFILE) {
369 FI_ENUM(FREE_IMAGE_FORMAT) {
411 FI_ENUM(FREE_IMAGE_TYPE) {
429 FI_ENUM(FREE_IMAGE_COLOR_TYPE) {
441 FI_ENUM(FREE_IMAGE_QUANTIZE) {
449 FI_ENUM(FREE_IMAGE_DITHER) {
462 FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
464 FIJPEG_OP_FLIP_H = 1,
465 FIJPEG_OP_FLIP_V = 2,
466 FIJPEG_OP_TRANSPOSE = 3,
467 FIJPEG_OP_TRANSVERSE = 4,
468 FIJPEG_OP_ROTATE_90 = 5,
469 FIJPEG_OP_ROTATE_180 = 6,
470 FIJPEG_OP_ROTATE_270 = 7
476 FI_ENUM(FREE_IMAGE_TMO) {
478 FITMO_REINHARD05 = 1,
485 FI_ENUM(FREE_IMAGE_FILTER) {
490 FILTER_CATMULLROM = 4,
497 FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) {
517 FI_ENUM(FREE_IMAGE_MDTYPE) {
541 FI_ENUM(FREE_IMAGE_MDMODEL) {
547 FIMD_EXIF_MAKERNOTE = 4,
548 FIMD_EXIF_INTEROP = 5,
560 FI_STRUCT (FIMETADATA) {
void *data; };
565 FI_STRUCT (FITAG) {
void *data; };
572 typedef void* fi_handle;
573 typedef unsigned (DLL_CALLCONV *FI_ReadProc) (
void *buffer,
unsigned size,
unsigned count, fi_handle handle);
574 typedef unsigned (DLL_CALLCONV *FI_WriteProc) (
void *buffer,
unsigned size,
unsigned count, fi_handle handle);
575 typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle,
long offset,
int origin);
576 typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);
578 #if (defined(_WIN32) || defined(__WIN32__))
579 #pragma pack(push, 1)
584 FI_STRUCT(FreeImageIO) {
585 FI_ReadProc read_proc;
586 FI_WriteProc write_proc;
587 FI_SeekProc seek_proc;
588 FI_TellProc tell_proc;
591 #if (defined(_WIN32) || defined(__WIN32__))
600 FI_STRUCT (FIMEMORY) {
void *data; };
602 #endif // FREEIMAGE_IO
609 typedef const char *(DLL_CALLCONV *FI_FormatProc)(
void);
610 typedef const char *(DLL_CALLCONV *FI_DescriptionProc)(
void);
611 typedef const char *(DLL_CALLCONV *FI_ExtensionListProc)(
void);
612 typedef const char *(DLL_CALLCONV *FI_RegExprProc)(
void);
613 typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);
614 typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle,
void *data);
615 typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle,
void *data);
616 typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle,
void *data);
617 typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle,
int page,
int flags,
void *data);
618 typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle,
int page,
int flags,
void *data);
619 typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle);
620 typedef const char *(DLL_CALLCONV *FI_MimeProc)(
void);
621 typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(
int bpp);
622 typedef BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type);
623 typedef BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)(void);
624 typedef BOOL (DLL_CALLCONV *FI_SupportsNoPixelsProc)(void);
627 FI_FormatProc format_proc;
628 FI_DescriptionProc description_proc;
629 FI_ExtensionListProc extension_proc;
630 FI_RegExprProc regexpr_proc;
631 FI_OpenProc open_proc;
632 FI_CloseProc close_proc;
633 FI_PageCountProc pagecount_proc;
634 FI_PageCapabilityProc pagecapability_proc;
635 FI_LoadProc load_proc;
636 FI_SaveProc save_proc;
637 FI_ValidateProc validate_proc;
638 FI_MimeProc mime_proc;
639 FI_SupportsExportBPPProc supports_export_bpp_proc;
640 FI_SupportsExportTypeProc supports_export_type_proc;
641 FI_SupportsICCProfilesProc supports_icc_profiles_proc;
642 FI_SupportsNoPixelsProc supports_no_pixels_proc;
645 typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin,
int format_id);
652 #define FIF_LOAD_NOPIXELS 0x8000 // loading: load the image header only (not supported by all plugins, default to full loading)
654 #define BMP_DEFAULT 0
655 #define BMP_SAVE_RLE 1
656 #define CUT_DEFAULT 0
657 #define DDS_DEFAULT 0
658 #define EXR_DEFAULT 0 // save data as half with piz-based wavelet compression
659 #define EXR_FLOAT 0x0001 // save data as float instead of as half (not recommended)
660 #define EXR_NONE 0x0002 // save with no compression
661 #define EXR_ZIP 0x0004 // save with zlib compression, in blocks of 16 scan lines
662 #define EXR_PIZ 0x0008 // save with piz-based wavelet compression
663 #define EXR_PXR24 0x0010 // save with lossy 24-bit float compression
664 #define EXR_B44 0x0020 // save with lossy 44% float compression - goes to 22% when combined with EXR_LC
665 #define EXR_LC 0x0040 // save images with one luminance and two chroma channels, rather than as RGB (lossy compression)
666 #define FAXG3_DEFAULT 0
667 #define GIF_DEFAULT 0
668 #define GIF_LOAD256 1 // Load the image as a 256 color image with ununsed palette entries, if it's 16 or 2 color
669 #define GIF_PLAYBACK 2 // 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading
670 #define HDR_DEFAULT 0
671 #define ICO_DEFAULT 0
672 #define ICO_MAKEALPHA 1 // convert to 32bpp and create an alpha channel from the AND-mask when loading
673 #define IFF_DEFAULT 0
674 #define J2K_DEFAULT 0 // save with a 16:1 rate
675 #define JP2_DEFAULT 0 // save with a 16:1 rate
676 #define JPEG_DEFAULT 0 // loading (see JPEG_FAST); saving (see JPEG_QUALITYGOOD|JPEG_SUBSAMPLING_420)
677 #define JPEG_FAST 0x0001 // load the file as fast as possible, sacrificing some quality
678 #define JPEG_ACCURATE 0x0002 // load the file with the best quality, sacrificing some speed
679 #define JPEG_CMYK 0x0004 // load separated CMYK "as is" (use | to combine with other load flags)
680 #define JPEG_EXIFROTATE 0x0008 // load and rotate according to Exif 'Orientation' tag if available
681 #define JPEG_GREYSCALE 0x0010 // load and convert to a 8-bit greyscale image
682 #define JPEG_QUALITYSUPERB 0x80 // save with superb quality (100:1)
683 #define JPEG_QUALITYGOOD 0x0100 // save with good quality (75:1)
684 #define JPEG_QUALITYNORMAL 0x0200 // save with normal quality (50:1)
685 #define JPEG_QUALITYAVERAGE 0x0400 // save with average quality (25:1)
686 #define JPEG_QUALITYBAD 0x0800 // save with bad quality (10:1)
687 #define JPEG_PROGRESSIVE 0x2000 // save as a progressive-JPEG (use | to combine with other save flags)
688 #define JPEG_SUBSAMPLING_411 0x1000 // save with high 4x1 chroma subsampling (4:1:1)
689 #define JPEG_SUBSAMPLING_420 0x4000 // save with medium 2x2 medium chroma subsampling (4:2:0) - default value
690 #define JPEG_SUBSAMPLING_422 0x8000 // save with low 2x1 chroma subsampling (4:2:2)
691 #define JPEG_SUBSAMPLING_444 0x10000 // save with no chroma subsampling (4:4:4)
692 #define JPEG_OPTIMIZE 0x20000 // on saving, compute optimal Huffman coding tables (can reduce a few percent of file size)
693 #define JPEG_BASELINE 0x40000 // save basic JPEG, without metadata or any markers
694 #define KOALA_DEFAULT 0
695 #define LBM_DEFAULT 0
696 #define MNG_DEFAULT 0
697 #define PCD_DEFAULT 0
698 #define PCD_BASE 1 // load the bitmap sized 768 x 512
699 #define PCD_BASEDIV4 2 // load the bitmap sized 384 x 256
700 #define PCD_BASEDIV16 3 // load the bitmap sized 192 x 128
701 #define PCX_DEFAULT 0
702 #define PFM_DEFAULT 0
703 #define PICT_DEFAULT 0
704 #define PNG_DEFAULT 0
705 #define PNG_IGNOREGAMMA 1 // loading: avoid gamma correction
706 #define PNG_Z_BEST_SPEED 0x0001 // save using ZLib level 1 compression flag (default value is 6)
707 #define PNG_Z_DEFAULT_COMPRESSION 0x0006 // save using ZLib level 6 compression flag (default recommended value)
708 #define PNG_Z_BEST_COMPRESSION 0x0009 // save using ZLib level 9 compression flag (default value is 6)
709 #define PNG_Z_NO_COMPRESSION 0x0100 // save without ZLib compression
710 #define PNG_INTERLACED 0x0200 // save using Adam7 interlacing (use | to combine with other save flags)
711 #define PNM_DEFAULT 0
712 #define PNM_SAVE_RAW 0 // If set the writer saves in RAW format (i.e. P4, P5 or P6)
713 #define PNM_SAVE_ASCII 1 // If set the writer saves in ASCII format (i.e. P1, P2 or P3)
714 #define PSD_DEFAULT 0
715 #define PSD_CMYK 1 // reads tags for separated CMYK (default is conversion to RGB)
716 #define PSD_LAB 2 // reads tags for CIELab (default is conversion to RGB)
717 #define RAS_DEFAULT 0
718 #define RAW_DEFAULT 0 // load the file as linear RGB 48-bit
719 #define RAW_PREVIEW 1 // try to load the embedded JPEG preview with included Exif Data or default to RGB 24-bit
720 #define RAW_DISPLAY 2 // load the file as RGB 24-bit
721 #define RAW_HALFSIZE 4 // output a half-size color image
722 #define SGI_DEFAULT 0
723 #define TARGA_DEFAULT 0
724 #define TARGA_LOAD_RGB888 1 // If set the loader converts RGB555 and ARGB8888 -> RGB888.
725 #define TARGA_SAVE_RLE 2 // If set, the writer saves with RLE compression
726 #define TIFF_DEFAULT 0
727 #define TIFF_CMYK 0x0001 // reads/stores tags for separated CMYK (use | to combine with compression flags)
728 #define TIFF_PACKBITS 0x0100 // save using PACKBITS compression
729 #define TIFF_DEFLATE 0x0200 // save using DEFLATE compression (a.k.a. ZLIB compression)
730 #define TIFF_ADOBE_DEFLATE 0x0400 // save using ADOBE DEFLATE compression
731 #define TIFF_NONE 0x0800 // save without any compression
732 #define TIFF_CCITTFAX3 0x1000 // save using CCITT Group 3 fax encoding
733 #define TIFF_CCITTFAX4 0x2000 // save using CCITT Group 4 fax encoding
734 #define TIFF_LZW 0x4000 // save using LZW compression
735 #define TIFF_JPEG 0x8000 // save using JPEG compression
736 #define TIFF_LOGLUV 0x10000 // save using LogLuv compression
737 #define WBMP_DEFAULT 0
738 #define XBM_DEFAULT 0
739 #define XPM_DEFAULT 0
744 #define FI_COLOR_IS_RGB_COLOR 0x00 // RGBQUAD color is a RGB color (contains no valid alpha channel)
745 #define FI_COLOR_IS_RGBA_COLOR 0x01 // RGBQUAD color is a RGBA color (contains a valid alpha channel)
746 #define FI_COLOR_FIND_EQUAL_COLOR 0x02 // For palettized images: lookup equal RGB color from palette
747 #define FI_COLOR_ALPHA_IS_INDEX 0x04 // The color's rgbReserved member (alpha) contains the palette index to be used
748 #define FI_COLOR_PALETTE_SEARCH_MASK (FI_COLOR_FIND_EQUAL_COLOR | FI_COLOR_ALPHA_IS_INDEX) // No color lookup is performed
757 DLL_API
void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE));
758 DLL_API
void DLL_CALLCONV FreeImage_DeInitialise(
void);
762 DLL_API
const char *DLL_CALLCONV FreeImage_GetVersion(
void);
763 DLL_API
const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(
void);
767 typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif,
const char *msg);
768 typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif,
const char *msg);
770 DLL_API
void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf);
771 DLL_API
void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf);
772 DLL_API
void DLL_CALLCONV FreeImage_OutputMessageProc(
int fif,
const char *fmt, ...);
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));
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));
778 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib);
779 DLL_API
void DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib);
782 DLL_API BOOL DLL_CALLCONV FreeImage_HasPixels(FIBITMAP *dib);
786 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif,
const char *filename,
int flags FI_DEFAULT(0));
787 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif,
const wchar_t *filename,
int flags FI_DEFAULT(0));
788 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle,
int flags FI_DEFAULT(0));
789 DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib,
const char *filename,
int flags FI_DEFAULT(0));
790 DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib,
const wchar_t *filename,
int flags FI_DEFAULT(0));
791 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle,
int flags FI_DEFAULT(0));
795 DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
796 DLL_API
void DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream);
797 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream,
int flags FI_DEFAULT(0));
798 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream,
int flags FI_DEFAULT(0));
799 DLL_API
long DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream);
800 DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream,
long offset,
int origin);
801 DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
802 DLL_API
unsigned DLL_CALLCONV FreeImage_ReadMemory(
void *buffer,
unsigned size,
unsigned count, FIMEMORY *stream);
803 DLL_API
unsigned DLL_CALLCONV FreeImage_WriteMemory(
const void *buffer,
unsigned size,
unsigned count, FIMEMORY *stream);
805 DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream,
int flags FI_DEFAULT(0));
806 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream,
int flags);
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));
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));
812 DLL_API
int DLL_CALLCONV FreeImage_GetFIFCount(
void);
813 DLL_API
int DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable);
814 DLL_API
int DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif);
815 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(
const char *format);
816 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(
const char *mime);
817 DLL_API
const char *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif);
818 DLL_API
const char *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif);
819 DLL_API
const char *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif);
820 DLL_API
const char *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif);
821 DLL_API
const char *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif);
822 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(
const char *filename);
823 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(
const wchar_t *filename);
824 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif);
825 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif);
826 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif,
int bpp);
827 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
828 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif);
829 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsNoPixels(FREE_IMAGE_FORMAT fif);
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));
834 DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle,
int flags FI_DEFAULT(0));
835 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle,
int flags FI_DEFAULT(0));
836 DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap,
int flags FI_DEFAULT(0));
837 DLL_API
int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap);
838 DLL_API
void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data);
839 DLL_API
void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap,
int page, FIBITMAP *data);
840 DLL_API
void DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap,
int page);
841 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap,
int page);
842 DLL_API
void DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
843 DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap,
int target,
int source);
844 DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap,
int *pages,
int *count);
848 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(
const char *filename,
int size FI_DEFAULT(0));
849 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(
const wchar_t *filename,
int size FI_DEFAULT(0));
850 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle,
int size FI_DEFAULT(0));
851 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream,
int size FI_DEFAULT(0));
855 DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib);
859 DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(
void);
860 DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(
const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
861 DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(
const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
865 DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib);
866 DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib,
int scanline);
868 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib,
unsigned x,
unsigned y, BYTE *value);
869 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib,
unsigned x,
unsigned y,
RGBQUAD *value);
870 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib,
unsigned x,
unsigned y, BYTE *value);
871 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib,
unsigned x,
unsigned y,
RGBQUAD *value);
875 DLL_API
unsigned DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib);
876 DLL_API
unsigned DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib);
877 DLL_API
unsigned DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib);
878 DLL_API
unsigned DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib);
879 DLL_API
unsigned DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib);
880 DLL_API
unsigned DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib);
881 DLL_API
unsigned DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib);
882 DLL_API
RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib);
884 DLL_API
unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib);
885 DLL_API
unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib);
886 DLL_API
void DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib,
unsigned res);
887 DLL_API
void DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib,
unsigned res);
889 DLL_API
BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib);
890 DLL_API
BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib);
891 DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib);
893 DLL_API
unsigned DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib);
894 DLL_API
unsigned DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib);
895 DLL_API
unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib);
897 DLL_API
unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib);
898 DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib);
899 DLL_API
void DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled);
900 DLL_API
void DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table,
int count);
901 DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib);
902 DLL_API
void DLL_CALLCONV FreeImage_SetTransparentIndex(FIBITMAP *dib,
int index);
903 DLL_API
int DLL_CALLCONV FreeImage_GetTransparentIndex(FIBITMAP *dib);
905 DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib);
906 DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib,
RGBQUAD *bkcolor);
907 DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib,
RGBQUAD *bkcolor);
909 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetThumbnail(FIBITMAP *dib);
910 DLL_API BOOL DLL_CALLCONV FreeImage_SetThumbnail(FIBITMAP *dib, FIBITMAP *thumbnail);
914 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib);
915 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib,
void *data,
long size);
916 DLL_API
void DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib);
920 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source,
int width_in_pixels);
921 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
922 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source,
int width_in_pixels);
923 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source,
int width_in_pixels);
924 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source,
int width_in_pixels);
925 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source,
int width_in_pixels);
926 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source,
int width_in_pixels);
927 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source,
int width_in_pixels);
928 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source,
int width_in_pixels);
929 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source,
int width_in_pixels);
930 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source,
int width_in_pixels);
931 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source,
int width_in_pixels);
932 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
933 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
934 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
935 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source,
int width_in_pixels);
936 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source,
int width_in_pixels);
937 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source,
int width_in_pixels);
938 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
939 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
940 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
941 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source,
int width_in_pixels);
942 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source,
int width_in_pixels);
943 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source,
int width_in_pixels);
944 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
945 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
946 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
947 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source,
int width_in_pixels);
948 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source,
int width_in_pixels);
949 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source,
int width_in_pixels);
950 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
951 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
952 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source,
int width_in_pixels,
RGBQUAD *palette);
953 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source,
int width_in_pixels);
954 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source,
int width_in_pixels);
955 DLL_API
void DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source,
int width_in_pixels);
959 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib);
960 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib);
961 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib);
962 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib);
963 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib);
964 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib);
965 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib);
966 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);
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));
968 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T);
969 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
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));
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));
974 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToFloat(FIBITMAP *dib);
975 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib);
976 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToUINT16(FIBITMAP *dib);
977 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGB16(FIBITMAP *dib);
979 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
980 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
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));
984 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src,
double gamma FI_DEFAULT(2.2),
double exposure FI_DEFAULT(0));
985 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src,
double intensity FI_DEFAULT(0),
double contrast FI_DEFAULT(0));
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));
988 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoFattal02(FIBITMAP *src,
double color_saturation FI_DEFAULT(0.5),
double attenuation FI_DEFAULT(0.85));
992 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
993 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
994 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
995 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
996 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size);
1003 DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag(
void);
1004 DLL_API
void DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag);
1005 DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag);
1008 DLL_API
const char *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag);
1009 DLL_API
const char *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag);
1010 DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag);
1011 DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag);
1012 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag);
1013 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag);
1014 DLL_API
const void *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag);
1016 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag,
const char *key);
1017 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag,
const char *description);
1018 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD
id);
1019 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type);
1020 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count);
1021 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length);
1022 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag,
const void *value);
1025 DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
1026 DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag);
1027 DLL_API
void DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle);
1030 DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib,
const char *key, FITAG *tag);
1031 DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib,
const char *key, FITAG **tag);
1034 DLL_API
unsigned DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
1035 DLL_API BOOL DLL_CALLCONV FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src);
1038 DLL_API
const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag,
char *Make FI_DEFAULT(NULL));
1046 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib,
double angle);
1047 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rotate(FIBITMAP *dib,
double angle,
const void *bkcolor FI_DEFAULT(NULL));
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);
1049 DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib);
1050 DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib);
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));
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));
1055 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib,
int dst_width,
int dst_height, FREE_IMAGE_FILTER filter);
1056 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib,
int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
1059 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
1060 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib,
double gamma);
1061 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib,
double percentage);
1062 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib,
double percentage);
1063 DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib);
1064 DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK));
1065 DLL_API
int DLL_CALLCONV FreeImage_GetAdjustColorsLookupTable(BYTE *LUT,
double brightness,
double contrast,
double gamma, BOOL invert);
1066 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustColors(FIBITMAP *dib,
double brightness,
double contrast,
double gamma, BOOL invert FI_DEFAULT(FALSE));
1067 DLL_API
unsigned DLL_CALLCONV FreeImage_ApplyColorMapping(FIBITMAP *dib,
RGBQUAD *srccolors,
RGBQUAD *dstcolors,
unsigned count, BOOL ignore_alpha, BOOL swap);
1068 DLL_API
unsigned DLL_CALLCONV FreeImage_SwapColors(FIBITMAP *dib,
RGBQUAD *color_a,
RGBQUAD *color_b, BOOL ignore_alpha);
1069 DLL_API
unsigned DLL_CALLCONV FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices, BYTE *dstindices,
unsigned count, BOOL swap);
1070 DLL_API
unsigned DLL_CALLCONV FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b);
1073 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
1074 DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
1075 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
1076 DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
1079 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib,
int left,
int top,
int right,
int bottom);
1080 DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src,
int left,
int top,
int alpha);
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));
1082 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(
const char *src_file,
const char *dst_file,
int left,
int top,
int right,
int bottom);
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);
1084 DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib);
1087 DLL_API BOOL DLL_CALLCONV FreeImage_FillBackground(FIBITMAP *dib,
const void *color,
int options FI_DEFAULT(0));
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));
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));
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));
1093 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian,
int ncycle FI_DEFAULT(3));
1096 #if defined(__BORLANDC__)
1104 #endif // FREEIMAGE_H
Definition: FreeImage.h:163
Definition: FreeImage.h:259
Definition: FreeImage.h:176
double i
imaginary part
Definition: FreeImage.h:263
Definition: FreeImage.h:250
Definition: FreeImage.h:208
Definition: FreeImage.h:225
Definition: FreeImage.h:233
Definition: FreeImage.h:194
double r
real part
Definition: FreeImage.h:261
Definition: FreeImage.h:242