+// ==========================================================\r
+// FreeImage 3\r
+//\r
+// Design and implementation by\r
+// - Floris van den Berg (flvdberg@wxs.nl)\r
+// - Hervé Drolon (drolon@infonie.fr)\r
+//\r
+// Contributors:\r
+// - Adam Gates (radad@xoasis.com)\r
+// - Alex Kwak\r
+// - Alexander Dymerets (sashad@te.net.ua)\r
+// - Detlev Vendt (detlev.vendt@brillit.de)\r
+// - Jan L. Nauta (jln@magentammt.com)\r
+// - Jani Kajala (janik@remedy.fi)\r
+// - Juergen Riecker (j.riecker@gmx.de)\r
+// - Karl-Heinz Bussian (khbussian@moss.de)\r
+// - Laurent Rocher (rocherl@club-internet.fr)\r
+// - Luca Piergentili (l.pierge@terra.es)\r
+// - Machiel ten Brinke (brinkem@uni-one.nl)\r
+// - Markus Loibl (markus.loibl@epost.de)\r
+// - Martin Weber (martweb@gmx.net)\r
+// - Matthias Wandel (mwandel@rim.net)\r
+// - Michal Novotny (michal@etc.cz)\r
+// - Petr Pytelka (pyta@lightcomp.com)\r
+// - Riley McNiff (rmcniff@marexgroup.com)\r
+// - Ryan Rubley (ryan@lostreality.org)\r
+// - Volker Gärtner (volkerg@gmx.at)\r
+//\r
+// This file is part of FreeImage 3\r
+//\r
+// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY\r
+// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES\r
+// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE\r
+// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED\r
+// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT\r
+// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY\r
+// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL\r
+// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER\r
+// THIS DISCLAIMER.\r
+//\r
+// Use at your own risk!\r
+// ==========================================================\r
+\r
+#ifndef FREEIMAGE_H\r
+#define FREEIMAGE_H\r
+\r
+// Version information ------------------------------------------------------\r
+\r
+#define FREEIMAGE_MAJOR_VERSION 3\r
+#define FREEIMAGE_MINOR_VERSION 13\r
+#define FREEIMAGE_RELEASE_SERIAL 1\r
+\r
+// Compiler options ---------------------------------------------------------\r
+\r
+#include <wchar.h> // needed for UNICODE functions\r
+\r
+#if defined(FREEIMAGE_LIB)\r
+ #define DLL_API\r
+ #define DLL_CALLCONV\r
+#else\r
+ #if defined(_WIN32) || defined(__WIN32__)\r
+ #define DLL_CALLCONV __stdcall\r
+ // The following ifdef block is the standard way of creating macros which make exporting \r
+ // from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS\r
+ // symbol defined on the command line. this symbol should not be defined on any project\r
+ // that uses this DLL. This way any other project whose source files include this file see \r
+ // DLL_API functions as being imported from a DLL, wheras this DLL sees symbols\r
+ // defined with this macro as being exported.\r
+ #ifdef FREEIMAGE_EXPORTS\r
+ #define DLL_API __declspec(dllexport)\r
+ #else\r
+ #define DLL_API __declspec(dllimport)\r
+ #endif // FREEIMAGE_EXPORTS\r
+ #else \r
+ // try the gcc visibility support (see http://gcc.gnu.org/wiki/Visibility)\r
+ #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))\r
+ #ifndef GCC_HASCLASSVISIBILITY\r
+ #define GCC_HASCLASSVISIBILITY\r
+ #endif\r
+ #endif // __GNUC__\r
+ #define DLL_CALLCONV\r
+ #if defined(GCC_HASCLASSVISIBILITY)\r
+ #define DLL_API __attribute__ ((visibility("default")))\r
+ #else\r
+ #define DLL_API\r
+ #endif \r
+ #endif // WIN32 / !WIN32\r
+#endif // FREEIMAGE_LIB\r
+\r
+// Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined\r
+// If your big endian system isn't being detected, add an OS specific check\r
+#if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \\r
+ (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \\r
+ defined(__BIG_ENDIAN__)\r
+#define FREEIMAGE_BIGENDIAN\r
+#endif // BYTE_ORDER\r
+\r
+// This really only affects 24 and 32 bit formats, the rest are always RGB order.\r
+#define FREEIMAGE_COLORORDER_BGR 0\r
+#define FREEIMAGE_COLORORDER_RGB 1\r
+#if defined(FREEIMAGE_BIGENDIAN)\r
+#define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_RGB\r
+#else\r
+#define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_BGR\r
+#endif\r
+\r
+// Ensure 4-byte enums if we're using Borland C++ compilers\r
+#if defined(__BORLANDC__)\r
+#pragma option push -b\r
+#endif\r
+\r
+// For C compatibility --------------------------------------------------------\r
+\r
+#ifdef __cplusplus\r
+#define FI_DEFAULT(x) = x\r
+#define FI_ENUM(x) enum x\r
+#define FI_STRUCT(x) struct x\r
+#else\r
+#define FI_DEFAULT(x)\r
+#define FI_ENUM(x) typedef int x; enum x\r
+#define FI_STRUCT(x) typedef struct x x; struct x\r
+#endif\r
+\r
+// Bitmap types -------------------------------------------------------------\r
+\r
+FI_STRUCT (FIBITMAP) { void *data; };\r
+FI_STRUCT (FIMULTIBITMAP) { void *data; };\r
+\r
+// Types used in the library (directly copied from Windows) -----------------\r
+\r
+#if defined(__MINGW32__) && defined(_WINDOWS_H)\r
+#define _WINDOWS_ // prevent a bug in MinGW32\r
+#endif // __MINGW32__\r
+\r
+#ifndef _WINDOWS_\r
+#define _WINDOWS_\r
+\r
+#ifndef FALSE\r
+#define FALSE 0\r
+#endif\r
+#ifndef TRUE\r
+#define TRUE 1\r
+#endif\r
+#ifndef NULL\r
+#define NULL 0\r
+#endif\r
+\r
+#ifndef SEEK_SET\r
+#define SEEK_SET 0\r
+#define SEEK_CUR 1\r
+#define SEEK_END 2\r
+#endif\r
+\r
+#ifndef _MSC_VER\r
+// define portable types for 32-bit / 64-bit OS\r
+#include <inttypes.h>\r
+typedef int32_t BOOL;\r
+typedef uint8_t BYTE;\r
+typedef uint16_t WORD;\r
+typedef uint32_t DWORD;\r
+typedef int32_t LONG;\r
+#else\r
+// MS is not C99 ISO compliant\r
+typedef long BOOL;\r
+typedef unsigned char BYTE;\r
+typedef unsigned short WORD;\r
+typedef unsigned long DWORD;\r
+typedef long LONG;\r
+#endif // _MSC_VER\r
+\r
+#if (defined(_WIN32) || defined(__WIN32__))\r
+#pragma pack(push, 1)\r
+#else\r
+#pragma pack(1)\r
+#endif // WIN32\r
+\r
+typedef struct tagRGBQUAD {\r
+#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR\r
+ BYTE rgbBlue;\r
+ BYTE rgbGreen;\r
+ BYTE rgbRed;\r
+#else\r
+ BYTE rgbRed;\r
+ BYTE rgbGreen;\r
+ BYTE rgbBlue;\r
+#endif // FREEIMAGE_COLORORDER\r
+ BYTE rgbReserved;\r
+} RGBQUAD;\r
+\r
+typedef struct tagRGBTRIPLE {\r
+#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR\r
+ BYTE rgbtBlue;\r
+ BYTE rgbtGreen;\r
+ BYTE rgbtRed;\r
+#else\r
+ BYTE rgbtRed;\r
+ BYTE rgbtGreen;\r
+ BYTE rgbtBlue;\r
+#endif // FREEIMAGE_COLORORDER\r
+} RGBTRIPLE;\r
+\r
+#if (defined(_WIN32) || defined(__WIN32__))\r
+#pragma pack(pop)\r
+#else\r
+#pragma pack()\r
+#endif // WIN32\r
+\r
+typedef struct tagBITMAPINFOHEADER{\r
+ DWORD biSize;\r
+ LONG biWidth; \r
+ LONG biHeight; \r
+ WORD biPlanes; \r
+ WORD biBitCount;\r
+ DWORD biCompression; \r
+ DWORD biSizeImage; \r
+ LONG biXPelsPerMeter; \r
+ LONG biYPelsPerMeter; \r
+ DWORD biClrUsed; \r
+ DWORD biClrImportant;\r
+} BITMAPINFOHEADER, *PBITMAPINFOHEADER; \r
+\r
+typedef struct tagBITMAPINFO { \r
+ BITMAPINFOHEADER bmiHeader; \r
+ RGBQUAD bmiColors[1];\r
+} BITMAPINFO, *PBITMAPINFO;\r
+\r
+#endif // _WINDOWS_\r
+\r
+// Types used in the library (specific to FreeImage) ------------------------\r
+\r
+#if (defined(_WIN32) || defined(__WIN32__))\r
+#pragma pack(push, 1)\r
+#else\r
+#pragma pack(1)\r
+#endif // WIN32\r
+\r
+/** 48-bit RGB \r
+*/\r
+typedef struct tagFIRGB16 {\r
+ WORD red;\r
+ WORD green;\r
+ WORD blue;\r
+} FIRGB16;\r
+\r
+/** 64-bit RGBA\r
+*/\r
+typedef struct tagFIRGBA16 {\r
+ WORD red;\r
+ WORD green;\r
+ WORD blue;\r
+ WORD alpha;\r
+} FIRGBA16;\r
+\r
+/** 96-bit RGB Float\r
+*/\r
+typedef struct tagFIRGBF {\r
+ float red;\r
+ float green;\r
+ float blue;\r
+} FIRGBF;\r
+\r
+/** 128-bit RGBA Float\r
+*/\r
+typedef struct tagFIRGBAF {\r
+ float red;\r
+ float green;\r
+ float blue;\r
+ float alpha;\r
+} FIRGBAF;\r
+\r
+/** Data structure for COMPLEX type (complex number)\r
+*/\r
+typedef struct tagFICOMPLEX {\r
+ /// real part\r
+ double r;\r
+ /// imaginary part\r
+ double i;\r
+} FICOMPLEX;\r
+\r
+#if (defined(_WIN32) || defined(__WIN32__))\r
+#pragma pack(pop)\r
+#else\r
+#pragma pack()\r
+#endif // WIN32\r
+\r
+// Indexes for byte arrays, masks and shifts for treating pixels as words ---\r
+// These coincide with the order of RGBQUAD and RGBTRIPLE -------------------\r
+\r
+#ifndef FREEIMAGE_BIGENDIAN\r
+#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR\r
+// Little Endian (x86 / MS Windows, Linux) : BGR(A) order\r
+#define FI_RGBA_RED 2\r
+#define FI_RGBA_GREEN 1\r
+#define FI_RGBA_BLUE 0\r
+#define FI_RGBA_ALPHA 3\r
+#define FI_RGBA_RED_MASK 0x00FF0000\r
+#define FI_RGBA_GREEN_MASK 0x0000FF00\r
+#define FI_RGBA_BLUE_MASK 0x000000FF\r
+#define FI_RGBA_ALPHA_MASK 0xFF000000\r
+#define FI_RGBA_RED_SHIFT 16\r
+#define FI_RGBA_GREEN_SHIFT 8\r
+#define FI_RGBA_BLUE_SHIFT 0\r
+#define FI_RGBA_ALPHA_SHIFT 24\r
+#else\r
+// Little Endian (x86 / MaxOSX) : RGB(A) order\r
+#define FI_RGBA_RED 0\r
+#define FI_RGBA_GREEN 1\r
+#define FI_RGBA_BLUE 2\r
+#define FI_RGBA_ALPHA 3\r
+#define FI_RGBA_RED_MASK 0x000000FF\r
+#define FI_RGBA_GREEN_MASK 0x0000FF00\r
+#define FI_RGBA_BLUE_MASK 0x00FF0000\r
+#define FI_RGBA_ALPHA_MASK 0xFF000000\r
+#define FI_RGBA_RED_SHIFT 0\r
+#define FI_RGBA_GREEN_SHIFT 8\r
+#define FI_RGBA_BLUE_SHIFT 16\r
+#define FI_RGBA_ALPHA_SHIFT 24\r
+#endif // FREEIMAGE_COLORORDER\r
+#else\r
+#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR\r
+// Big Endian (PPC / none) : BGR(A) order\r
+#define FI_RGBA_RED 2\r
+#define FI_RGBA_GREEN 1\r
+#define FI_RGBA_BLUE 0\r
+#define FI_RGBA_ALPHA 3\r
+#define FI_RGBA_RED_MASK 0x0000FF00\r
+#define FI_RGBA_GREEN_MASK 0x00FF0000\r
+#define FI_RGBA_BLUE_MASK 0xFF000000\r
+#define FI_RGBA_ALPHA_MASK 0x000000FF\r
+#define FI_RGBA_RED_SHIFT 8\r
+#define FI_RGBA_GREEN_SHIFT 16\r
+#define FI_RGBA_BLUE_SHIFT 24\r
+#define FI_RGBA_ALPHA_SHIFT 0\r
+#else\r
+// Big Endian (PPC / Linux, MaxOSX) : RGB(A) order\r
+#define FI_RGBA_RED 0\r
+#define FI_RGBA_GREEN 1\r
+#define FI_RGBA_BLUE 2\r
+#define FI_RGBA_ALPHA 3\r
+#define FI_RGBA_RED_MASK 0xFF000000\r
+#define FI_RGBA_GREEN_MASK 0x00FF0000\r
+#define FI_RGBA_BLUE_MASK 0x0000FF00\r
+#define FI_RGBA_ALPHA_MASK 0x000000FF\r
+#define FI_RGBA_RED_SHIFT 24\r
+#define FI_RGBA_GREEN_SHIFT 16\r
+#define FI_RGBA_BLUE_SHIFT 8\r
+#define FI_RGBA_ALPHA_SHIFT 0\r
+#endif // FREEIMAGE_COLORORDER\r
+#endif // FREEIMAGE_BIGENDIAN\r
+\r
+#define FI_RGBA_RGB_MASK (FI_RGBA_RED_MASK|FI_RGBA_GREEN_MASK|FI_RGBA_BLUE_MASK)\r
+\r
+// The 16bit macros only include masks and shifts, since each color element is not byte aligned\r
+\r
+#define FI16_555_RED_MASK 0x7C00\r
+#define FI16_555_GREEN_MASK 0x03E0\r
+#define FI16_555_BLUE_MASK 0x001F\r
+#define FI16_555_RED_SHIFT 10\r
+#define FI16_555_GREEN_SHIFT 5\r
+#define FI16_555_BLUE_SHIFT 0\r
+#define FI16_565_RED_MASK 0xF800\r
+#define FI16_565_GREEN_MASK 0x07E0\r
+#define FI16_565_BLUE_MASK 0x001F\r
+#define FI16_565_RED_SHIFT 11\r
+#define FI16_565_GREEN_SHIFT 5\r
+#define FI16_565_BLUE_SHIFT 0\r
+\r
+// ICC profile support ------------------------------------------------------\r
+\r
+#define FIICC_DEFAULT 0x00\r
+#define FIICC_COLOR_IS_CMYK 0x01\r
+\r
+FI_STRUCT (FIICCPROFILE) { \r
+ WORD flags; // info flag\r
+ DWORD size; // profile's size measured in bytes\r
+ void *data; // points to a block of contiguous memory containing the profile\r
+};\r
+\r
+// Important enums ----------------------------------------------------------\r
+\r
+/** I/O image format identifiers.\r
+*/\r
+FI_ENUM(FREE_IMAGE_FORMAT) {\r
+ FIF_UNKNOWN = -1,\r
+ FIF_BMP = 0,\r
+ FIF_ICO = 1,\r
+ FIF_JPEG = 2,\r
+ FIF_JNG = 3,\r
+ FIF_KOALA = 4,\r
+ FIF_LBM = 5,\r
+ FIF_IFF = FIF_LBM,\r
+ FIF_MNG = 6,\r
+ FIF_PBM = 7,\r
+ FIF_PBMRAW = 8,\r
+ FIF_PCD = 9,\r
+ FIF_PCX = 10,\r
+ FIF_PGM = 11,\r
+ FIF_PGMRAW = 12,\r
+ FIF_PNG = 13,\r
+ FIF_PPM = 14,\r
+ FIF_PPMRAW = 15,\r
+ FIF_RAS = 16,\r
+ FIF_TARGA = 17,\r
+ FIF_TIFF = 18,\r
+ FIF_WBMP = 19,\r
+ FIF_PSD = 20,\r
+ FIF_CUT = 21,\r
+ FIF_XBM = 22,\r
+ FIF_XPM = 23,\r
+ FIF_DDS = 24,\r
+ FIF_GIF = 25,\r
+ FIF_HDR = 26,\r
+ FIF_FAXG3 = 27,\r
+ FIF_SGI = 28,\r
+ FIF_EXR = 29,\r
+ FIF_J2K = 30,\r
+ FIF_JP2 = 31,\r
+ FIF_PFM = 32,\r
+ FIF_PICT = 33,\r
+ FIF_RAW = 34\r
+};\r
+\r
+/** Image type used in FreeImage.\r
+*/\r
+FI_ENUM(FREE_IMAGE_TYPE) {\r
+ FIT_UNKNOWN = 0, // unknown type\r
+ FIT_BITMAP = 1, // standard image : 1-, 4-, 8-, 16-, 24-, 32-bit\r
+ FIT_UINT16 = 2, // array of unsigned short : unsigned 16-bit\r
+ FIT_INT16 = 3, // array of short : signed 16-bit\r
+ FIT_UINT32 = 4, // array of unsigned long : unsigned 32-bit\r
+ FIT_INT32 = 5, // array of long : signed 32-bit\r
+ FIT_FLOAT = 6, // array of float : 32-bit IEEE floating point\r
+ FIT_DOUBLE = 7, // array of double : 64-bit IEEE floating point\r
+ FIT_COMPLEX = 8, // array of FICOMPLEX : 2 x 64-bit IEEE floating point\r
+ FIT_RGB16 = 9, // 48-bit RGB image : 3 x 16-bit\r
+ FIT_RGBA16 = 10, // 64-bit RGBA image : 4 x 16-bit\r
+ FIT_RGBF = 11, // 96-bit RGB float image : 3 x 32-bit IEEE floating point\r
+ FIT_RGBAF = 12 // 128-bit RGBA float image : 4 x 32-bit IEEE floating point\r
+};\r
+\r
+/** Image color type used in FreeImage.\r
+*/\r
+FI_ENUM(FREE_IMAGE_COLOR_TYPE) {\r
+ FIC_MINISWHITE = 0, // min value is white\r
+ FIC_MINISBLACK = 1, // min value is black\r
+ FIC_RGB = 2, // RGB color model\r
+ FIC_PALETTE = 3, // color map indexed\r
+ FIC_RGBALPHA = 4, // RGB color model with alpha channel\r
+ FIC_CMYK = 5 // CMYK color model\r
+};\r
+\r
+/** Color quantization algorithms.\r
+Constants used in FreeImage_ColorQuantize.\r
+*/\r
+FI_ENUM(FREE_IMAGE_QUANTIZE) {\r
+ FIQ_WUQUANT = 0, // Xiaolin Wu color quantization algorithm\r
+ FIQ_NNQUANT = 1 // NeuQuant neural-net quantization algorithm by Anthony Dekker\r
+};\r
+\r
+/** Dithering algorithms.\r
+Constants used in FreeImage_Dither.\r
+*/\r
+FI_ENUM(FREE_IMAGE_DITHER) {\r
+ FID_FS = 0, // Floyd & Steinberg error diffusion\r
+ FID_BAYER4x4 = 1, // Bayer ordered dispersed dot dithering (order 2 dithering matrix)\r
+ FID_BAYER8x8 = 2, // Bayer ordered dispersed dot dithering (order 3 dithering matrix)\r
+ FID_CLUSTER6x6 = 3, // Ordered clustered dot dithering (order 3 - 6x6 matrix)\r
+ FID_CLUSTER8x8 = 4, // Ordered clustered dot dithering (order 4 - 8x8 matrix)\r
+ FID_CLUSTER16x16= 5, // Ordered clustered dot dithering (order 8 - 16x16 matrix)\r
+ FID_BAYER16x16 = 6 // Bayer ordered dispersed dot dithering (order 4 dithering matrix)\r
+};\r
+\r
+/** Lossless JPEG transformations\r
+Constants used in FreeImage_JPEGTransform\r
+*/\r
+FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {\r
+ FIJPEG_OP_NONE = 0, // no transformation\r
+ FIJPEG_OP_FLIP_H = 1, // horizontal flip\r
+ FIJPEG_OP_FLIP_V = 2, // vertical flip\r
+ FIJPEG_OP_TRANSPOSE = 3, // transpose across UL-to-LR axis\r
+ FIJPEG_OP_TRANSVERSE = 4, // transpose across UR-to-LL axis\r
+ FIJPEG_OP_ROTATE_90 = 5, // 90-degree clockwise rotation\r
+ FIJPEG_OP_ROTATE_180 = 6, // 180-degree rotation\r
+ FIJPEG_OP_ROTATE_270 = 7 // 270-degree clockwise (or 90 ccw)\r
+};\r
+\r
+/** Tone mapping operators.\r
+Constants used in FreeImage_ToneMapping.\r
+*/\r
+FI_ENUM(FREE_IMAGE_TMO) {\r
+ FITMO_DRAGO03 = 0, // Adaptive logarithmic mapping (F. Drago, 2003)\r
+ FITMO_REINHARD05 = 1, // Dynamic range reduction inspired by photoreceptor physiology (E. Reinhard, 2005)\r
+ FITMO_FATTAL02 = 2 // Gradient domain high dynamic range compression (R. Fattal, 2002)\r
+};\r
+\r
+/** Upsampling / downsampling filters. \r
+Constants used in FreeImage_Rescale.\r
+*/\r
+FI_ENUM(FREE_IMAGE_FILTER) {\r
+ FILTER_BOX = 0, // Box, pulse, Fourier window, 1st order (constant) b-spline\r
+ FILTER_BICUBIC = 1, // Mitchell & Netravali's two-param cubic filter\r
+ FILTER_BILINEAR = 2, // Bilinear filter\r
+ FILTER_BSPLINE = 3, // 4th order (cubic) b-spline\r
+ FILTER_CATMULLROM = 4, // Catmull-Rom spline, Overhauser spline\r
+ FILTER_LANCZOS3 = 5 // Lanczos3 filter\r
+};\r
+\r
+/** Color channels.\r
+Constants used in color manipulation routines.\r
+*/\r
+FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) {\r
+ FICC_RGB = 0, // Use red, green and blue channels\r
+ FICC_RED = 1, // Use red channel\r
+ FICC_GREEN = 2, // Use green channel\r
+ FICC_BLUE = 3, // Use blue channel\r
+ FICC_ALPHA = 4, // Use alpha channel\r
+ FICC_BLACK = 5, // Use black channel\r
+ FICC_REAL = 6, // Complex images: use real part\r
+ FICC_IMAG = 7, // Complex images: use imaginary part\r
+ FICC_MAG = 8, // Complex images: use magnitude\r
+ FICC_PHASE = 9 // Complex images: use phase\r
+};\r
+\r
+// Metadata support ---------------------------------------------------------\r
+\r
+/**\r
+ Tag data type information (based on TIFF specifications)\r
+\r
+ Note: RATIONALs are the ratio of two 32-bit integer values.\r
+*/\r
+FI_ENUM(FREE_IMAGE_MDTYPE) {\r
+ FIDT_NOTYPE = 0, // placeholder \r
+ FIDT_BYTE = 1, // 8-bit unsigned integer \r
+ FIDT_ASCII = 2, // 8-bit bytes w/ last byte null \r
+ FIDT_SHORT = 3, // 16-bit unsigned integer \r
+ FIDT_LONG = 4, // 32-bit unsigned integer \r
+ FIDT_RATIONAL = 5, // 64-bit unsigned fraction \r
+ FIDT_SBYTE = 6, // 8-bit signed integer \r
+ FIDT_UNDEFINED = 7, // 8-bit untyped data \r
+ FIDT_SSHORT = 8, // 16-bit signed integer \r
+ FIDT_SLONG = 9, // 32-bit signed integer \r
+ FIDT_SRATIONAL = 10, // 64-bit signed fraction \r
+ FIDT_FLOAT = 11, // 32-bit IEEE floating point \r
+ FIDT_DOUBLE = 12, // 64-bit IEEE floating point \r
+ FIDT_IFD = 13, // 32-bit unsigned integer (offset) \r
+ FIDT_PALETTE = 14 // 32-bit RGBQUAD \r
+};\r
+\r
+/**\r
+ Metadata models supported by FreeImage\r
+*/\r
+FI_ENUM(FREE_IMAGE_MDMODEL) {\r
+ FIMD_NODATA = -1,\r
+ FIMD_COMMENTS = 0, // single comment or keywords\r
+ FIMD_EXIF_MAIN = 1, // Exif-TIFF metadata\r
+ FIMD_EXIF_EXIF = 2, // Exif-specific metadata\r
+ FIMD_EXIF_GPS = 3, // Exif GPS metadata\r
+ FIMD_EXIF_MAKERNOTE = 4, // Exif maker note metadata\r
+ FIMD_EXIF_INTEROP = 5, // Exif interoperability metadata\r
+ FIMD_IPTC = 6, // IPTC/NAA metadata\r
+ FIMD_XMP = 7, // Abobe XMP metadata\r
+ FIMD_GEOTIFF = 8, // GeoTIFF metadata\r
+ FIMD_ANIMATION = 9, // Animation metadata\r
+ FIMD_CUSTOM = 10 // Used to attach other metadata types to a dib\r
+};\r
+\r
+/**\r
+ Handle to a metadata model\r
+*/\r
+FI_STRUCT (FIMETADATA) { void *data; };\r
+\r
+/**\r
+ Handle to a FreeImage tag\r
+*/\r
+FI_STRUCT (FITAG) { void *data; };\r
+\r
+// File IO routines ---------------------------------------------------------\r
+\r
+#ifndef FREEIMAGE_IO\r
+#define FREEIMAGE_IO\r
+\r
+typedef void* fi_handle;\r
+typedef unsigned (DLL_CALLCONV *FI_ReadProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);\r
+typedef unsigned (DLL_CALLCONV *FI_WriteProc) (void *buffer, unsigned size, unsigned count, fi_handle handle);\r
+typedef int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, long offset, int origin);\r
+typedef long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);\r
+\r
+#if (defined(_WIN32) || defined(__WIN32__))\r
+#pragma pack(push, 1)\r
+#else\r
+#pragma pack(1)\r
+#endif // WIN32\r
+\r
+FI_STRUCT(FreeImageIO) {\r
+ FI_ReadProc read_proc; // pointer to the function used to read data\r
+ FI_WriteProc write_proc; // pointer to the function used to write data\r
+ FI_SeekProc seek_proc; // pointer to the function used to seek\r
+ FI_TellProc tell_proc; // pointer to the function used to aquire the current position\r
+};\r
+\r
+#if (defined(_WIN32) || defined(__WIN32__))\r
+#pragma pack(pop)\r
+#else\r
+#pragma pack()\r
+#endif // WIN32\r
+\r
+/**\r
+Handle to a memory I/O stream\r
+*/\r
+FI_STRUCT (FIMEMORY) { void *data; };\r
+\r
+#endif // FREEIMAGE_IO\r
+\r
+// Plugin routines ----------------------------------------------------------\r
+\r
+#ifndef PLUGINS\r
+#define PLUGINS\r
+\r
+typedef const char *(DLL_CALLCONV *FI_FormatProc)(void);\r
+typedef const char *(DLL_CALLCONV *FI_DescriptionProc)(void);\r
+typedef const char *(DLL_CALLCONV *FI_ExtensionListProc)(void);\r
+typedef const char *(DLL_CALLCONV *FI_RegExprProc)(void);\r
+typedef void *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);\r
+typedef void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, void *data);\r
+typedef int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, void *data);\r
+typedef int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, void *data);\r
+typedef FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle, int page, int flags, void *data);\r
+typedef BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data);\r
+typedef BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle);\r
+typedef const char *(DLL_CALLCONV *FI_MimeProc)(void);\r
+typedef BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(int bpp);\r
+typedef BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type);\r
+typedef BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)(void);\r
+\r
+FI_STRUCT (Plugin) {\r
+ FI_FormatProc format_proc;\r
+ FI_DescriptionProc description_proc;\r
+ FI_ExtensionListProc extension_proc;\r
+ FI_RegExprProc regexpr_proc;\r
+ FI_OpenProc open_proc;\r
+ FI_CloseProc close_proc;\r
+ FI_PageCountProc pagecount_proc;\r
+ FI_PageCapabilityProc pagecapability_proc;\r
+ FI_LoadProc load_proc;\r
+ FI_SaveProc save_proc;\r
+ FI_ValidateProc validate_proc;\r
+ FI_MimeProc mime_proc;\r
+ FI_SupportsExportBPPProc supports_export_bpp_proc;\r
+ FI_SupportsExportTypeProc supports_export_type_proc;\r
+ FI_SupportsICCProfilesProc supports_icc_profiles_proc;\r
+};\r
+\r
+typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id);\r
+\r
+#endif // PLUGINS\r
+\r
+\r
+// Load / Save flag constants -----------------------------------------------\r
+\r
+#define BMP_DEFAULT 0\r
+#define BMP_SAVE_RLE 1\r
+#define CUT_DEFAULT 0\r
+#define DDS_DEFAULT 0\r
+#define EXR_DEFAULT 0 // save data as half with piz-based wavelet compression\r
+#define EXR_FLOAT 0x0001 // save data as float instead of as half (not recommended)\r
+#define EXR_NONE 0x0002 // save with no compression\r
+#define EXR_ZIP 0x0004 // save with zlib compression, in blocks of 16 scan lines\r
+#define EXR_PIZ 0x0008 // save with piz-based wavelet compression\r
+#define EXR_PXR24 0x0010 // save with lossy 24-bit float compression\r
+#define EXR_B44 0x0020 // save with lossy 44% float compression - goes to 22% when combined with EXR_LC\r
+#define EXR_LC 0x0040 // save images with one luminance and two chroma channels, rather than as RGB (lossy compression)\r
+#define FAXG3_DEFAULT 0\r
+#define GIF_DEFAULT 0\r
+#define GIF_LOAD256 1 // Load the image as a 256 color image with ununsed palette entries, if it's 16 or 2 color\r
+#define GIF_PLAYBACK 2 // 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading\r
+#define HDR_DEFAULT 0\r
+#define ICO_DEFAULT 0\r
+#define ICO_MAKEALPHA 1 // convert to 32bpp and create an alpha channel from the AND-mask when loading\r
+#define IFF_DEFAULT 0\r
+#define J2K_DEFAULT 0 // save with a 16:1 rate\r
+#define JP2_DEFAULT 0 // save with a 16:1 rate\r
+#define JPEG_DEFAULT 0 // loading (see JPEG_FAST); saving (see JPEG_QUALITYGOOD|JPEG_SUBSAMPLING_420)\r
+#define JPEG_FAST 0x0001 // load the file as fast as possible, sacrificing some quality\r
+#define JPEG_ACCURATE 0x0002 // load the file with the best quality, sacrificing some speed\r
+#define JPEG_CMYK 0x0004 // load separated CMYK "as is" (use | to combine with other load flags)\r
+#define JPEG_EXIFROTATE 0x0008 // load and rotate according to Exif 'Orientation' tag if available\r
+#define JPEG_QUALITYSUPERB 0x80 // save with superb quality (100:1)\r
+#define JPEG_QUALITYGOOD 0x0100 // save with good quality (75:1)\r
+#define JPEG_QUALITYNORMAL 0x0200 // save with normal quality (50:1)\r
+#define JPEG_QUALITYAVERAGE 0x0400 // save with average quality (25:1)\r
+#define JPEG_QUALITYBAD 0x0800 // save with bad quality (10:1)\r
+#define JPEG_PROGRESSIVE 0x2000 // save as a progressive-JPEG (use | to combine with other save flags)\r
+#define JPEG_SUBSAMPLING_411 0x1000 // save with high 4x1 chroma subsampling (4:1:1) \r
+#define JPEG_SUBSAMPLING_420 0x4000 // save with medium 2x2 medium chroma subsampling (4:2:0) - default value\r
+#define JPEG_SUBSAMPLING_422 0x8000 // save with low 2x1 chroma subsampling (4:2:2) \r
+#define JPEG_SUBSAMPLING_444 0x10000 // save with no chroma subsampling (4:4:4)\r
+#define KOALA_DEFAULT 0\r
+#define LBM_DEFAULT 0\r
+#define MNG_DEFAULT 0\r
+#define PCD_DEFAULT 0\r
+#define PCD_BASE 1 // load the bitmap sized 768 x 512\r
+#define PCD_BASEDIV4 2 // load the bitmap sized 384 x 256\r
+#define PCD_BASEDIV16 3 // load the bitmap sized 192 x 128\r
+#define PCX_DEFAULT 0\r
+#define PFM_DEFAULT 0\r
+#define PICT_DEFAULT 0\r
+#define PNG_DEFAULT 0\r
+#define PNG_IGNOREGAMMA 1 // loading: avoid gamma correction\r
+#define PNG_Z_BEST_SPEED 0x0001 // save using ZLib level 1 compression flag (default value is 6)\r
+#define PNG_Z_DEFAULT_COMPRESSION 0x0006 // save using ZLib level 6 compression flag (default recommended value)\r
+#define PNG_Z_BEST_COMPRESSION 0x0009 // save using ZLib level 9 compression flag (default value is 6)\r
+#define PNG_Z_NO_COMPRESSION 0x0100 // save without ZLib compression\r
+#define PNG_INTERLACED 0x0200 // save using Adam7 interlacing (use | to combine with other save flags)\r
+#define PNM_DEFAULT 0\r
+#define PNM_SAVE_RAW 0 // If set the writer saves in RAW format (i.e. P4, P5 or P6)\r
+#define PNM_SAVE_ASCII 1 // If set the writer saves in ASCII format (i.e. P1, P2 or P3)\r
+#define PSD_DEFAULT 0\r
+#define RAS_DEFAULT 0\r
+#define RAW_DEFAULT 0 // load the file as linear RGB 48-bit\r
+#define RAW_PREVIEW 1 // try to load the embedded JPEG preview with included Exif Data or default to RGB 24-bit\r
+#define RAW_DISPLAY 2 // load the file as RGB 24-bit\r
+#define SGI_DEFAULT 0\r
+#define TARGA_DEFAULT 0\r
+#define TARGA_LOAD_RGB888 1 // If set the loader converts RGB555 and ARGB8888 -> RGB888.\r
+#define TIFF_DEFAULT 0\r
+#define TIFF_CMYK 0x0001 // reads/stores tags for separated CMYK (use | to combine with compression flags)\r
+#define TIFF_PACKBITS 0x0100 // save using PACKBITS compression\r
+#define TIFF_DEFLATE 0x0200 // save using DEFLATE compression (a.k.a. ZLIB compression)\r
+#define TIFF_ADOBE_DEFLATE 0x0400 // save using ADOBE DEFLATE compression\r
+#define TIFF_NONE 0x0800 // save without any compression\r
+#define TIFF_CCITTFAX3 0x1000 // save using CCITT Group 3 fax encoding\r
+#define TIFF_CCITTFAX4 0x2000 // save using CCITT Group 4 fax encoding\r
+#define TIFF_LZW 0x4000 // save using LZW compression\r
+#define TIFF_JPEG 0x8000 // save using JPEG compression\r
+#define WBMP_DEFAULT 0\r
+#define XBM_DEFAULT 0\r
+#define XPM_DEFAULT 0\r
+\r
+// Background filling options ---------------------------------------------------------\r
+// Constants used in FreeImage_FillBackground and FreeImage_EnlargeCanvas\r
+\r
+#define FI_COLOR_IS_RGB_COLOR 0x00 // RGBQUAD color is a RGB color (contains no valid alpha channel)\r
+#define FI_COLOR_IS_RGBA_COLOR 0x01 // RGBQUAD color is a RGBA color (contains a valid alpha channel)\r
+#define FI_COLOR_FIND_EQUAL_COLOR 0x02 // For palettized images: lookup equal RGB color from palette\r
+#define FI_COLOR_ALPHA_IS_INDEX 0x04 // The color's rgbReserved member (alpha) contains the palette index to be used\r
+#define FI_COLOR_PALETTE_SEARCH_MASK (FI_COLOR_FIND_EQUAL_COLOR | FI_COLOR_ALPHA_IS_INDEX) // No color lookup is performed\r
+\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+// Init / Error routines ----------------------------------------------------\r
+\r
+DLL_API void DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE));\r
+DLL_API void DLL_CALLCONV FreeImage_DeInitialise(void);\r
+\r
+// Version routines ---------------------------------------------------------\r
+\r
+DLL_API const char *DLL_CALLCONV FreeImage_GetVersion(void);\r
+DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void);\r
+\r
+// Message output functions -------------------------------------------------\r
+\r
+typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg);\r
+typedef void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, const char *msg); \r
+\r
+DLL_API void DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf); \r
+DLL_API void DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf);\r
+DLL_API void DLL_CALLCONV FreeImage_OutputMessageProc(int fif, const char *fmt, ...);\r
+\r
+// Allocate / Clone / Unload routines ---------------------------------------\r
+\r
+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
+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
+DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib);\r
+DLL_API void DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib);\r
+\r
+// Load / Save routines -----------------------------------------------------\r
+\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif, const char *filename, int flags FI_DEFAULT(0));\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));\r
+DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const char *filename, int flags FI_DEFAULT(0));\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));\r
+\r
+// Memory I/O stream routines -----------------------------------------------\r
+\r
+DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));\r
+DLL_API void DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));\r
+DLL_API long DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_ReadMemory(void *buffer, unsigned size, unsigned count, FIMEMORY *stream);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_WriteMemory(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream);\r
+DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));\r
+\r
+// Plugin Interface ---------------------------------------------------------\r
+\r
+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
+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
+DLL_API int DLL_CALLCONV FreeImage_GetFIFCount(void);\r
+DLL_API int DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable);\r
+DLL_API int DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif);\r
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(const char *format);\r
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(const char *mime);\r
+DLL_API const char *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif);\r
+DLL_API const char *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif);\r
+DLL_API const char *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif);\r
+DLL_API const char *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif);\r
+DLL_API const char *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif);\r
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(const char *filename);\r
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(const wchar_t *filename);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, int bpp);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif);\r
+\r
+// Multipaging interface ----------------------------------------------------\r
+\r
+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
+DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));\r
+DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));\r
+DLL_API int DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap);\r
+DLL_API void DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data);\r
+DLL_API void DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data);\r
+DLL_API void DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap, int page);\r
+DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap, int page);\r
+DLL_API void DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap, int target, int source);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, int *pages, int *count);\r
+\r
+// Filetype request routines ------------------------------------------------\r
+\r
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(const char *filename, int size FI_DEFAULT(0));\r
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(const wchar_t *filename, int size FI_DEFAULT(0));\r
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0));\r
+DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, int size FI_DEFAULT(0));\r
+\r
+// Image type request routine -----------------------------------------------\r
+\r
+DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib);\r
+\r
+// FreeImage helper routines ------------------------------------------------\r
+\r
+DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);\r
+\r
+// Pixel access routines ----------------------------------------------------\r
+\r
+DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib);\r
+DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib, int scanline);\r
+\r
+DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);\r
+\r
+// DIB info routines --------------------------------------------------------\r
+\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib);\r
+DLL_API RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib);\r
+\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib);\r
+DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib, unsigned res);\r
+DLL_API void DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib, unsigned res);\r
+\r
+DLL_API BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib);\r
+DLL_API BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib);\r
+DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib);\r
+\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib);\r
+\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib);\r
+DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib);\r
+DLL_API void DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled);\r
+DLL_API void DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, int count);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib);\r
+DLL_API void DLL_CALLCONV FreeImage_SetTransparentIndex(FIBITMAP *dib, int index);\r
+DLL_API int DLL_CALLCONV FreeImage_GetTransparentIndex(FIBITMAP *dib);\r
+\r
+DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);\r
+\r
+\r
+// ICC profile routines -----------------------------------------------------\r
+\r
+DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib);\r
+DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, void *data, long size);\r
+DLL_API void DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib);\r
+\r
+// Line conversion routines -------------------------------------------------\r
+\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, int width_in_pixels, RGBQUAD *palette);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, int width_in_pixels);\r
+DLL_API void DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, int width_in_pixels);\r
+\r
+// Smart conversion routines ------------------------------------------------\r
+\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);\r
+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
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);\r
+\r
+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
+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
+\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib);\r
+\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));\r
+\r
+// tone mapping operators\r
+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
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0));\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0));\r
+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
+\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoFattal02(FIBITMAP *src, double color_saturation FI_DEFAULT(0.5), double attenuation FI_DEFAULT(0.85));\r
+\r
+// ZLib interface -----------------------------------------------------------\r
+\r
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);\r
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);\r
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);\r
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);\r
+DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size);\r
+\r
+// --------------------------------------------------------------------------\r
+// Metadata routines --------------------------------------------------------\r
+// --------------------------------------------------------------------------\r
+\r
+// tag creation / destruction\r
+DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag(void);\r
+DLL_API void DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag);\r
+DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag);\r
+\r
+// tag getters and setters\r
+DLL_API const char *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag);\r
+DLL_API const char *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag);\r
+DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag);\r
+DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag);\r
+DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag);\r
+DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag);\r
+DLL_API const void *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag);\r
+\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag, const char *key);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag, const char *description);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD id);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag, const void *value);\r
+\r
+// iterator\r
+DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag);\r
+DLL_API void DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle);\r
+\r
+// metadata setter and getter\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG *tag);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FITAG **tag);\r
+\r
+// helpers\r
+DLL_API unsigned DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src);\r
+\r
+// tag to C string conversion\r
+DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, char *Make FI_DEFAULT(NULL));\r
+\r
+// --------------------------------------------------------------------------\r
+// Image manipulation toolkit -----------------------------------------------\r
+// --------------------------------------------------------------------------\r
+\r
+// rotation and flipping\r
+/// @deprecated see FreeImage_Rotate\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib, double angle);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor FI_DEFAULT(NULL));\r
+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
+DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib);\r
+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
+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
+\r
+// upsampling / downsampling\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));\r
+\r
+// color manipulation routines (point operations)\r
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib, double gamma);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib, double percentage);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib, double percentage);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK));\r
+DLL_API int DLL_CALLCONV FreeImage_GetAdjustColorsLookupTable(BYTE *LUT, double brightness, double contrast, double gamma, BOOL invert);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_AdjustColors(FIBITMAP *dib, double brightness, double contrast, double gamma, BOOL invert FI_DEFAULT(FALSE));\r
+DLL_API unsigned DLL_CALLCONV FreeImage_ApplyColorMapping(FIBITMAP *dib, RGBQUAD *srccolors, RGBQUAD *dstcolors, unsigned count, BOOL ignore_alpha, BOOL swap);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_SwapColors(FIBITMAP *dib, RGBQUAD *color_a, RGBQUAD *color_b, BOOL ignore_alpha);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices, BYTE *dstindices, unsigned count, BOOL swap);\r
+DLL_API unsigned DLL_CALLCONV FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b);\r
+\r
+// channel processing routines\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dib, FIBITMAP *dib8, FREE_IMAGE_COLOR_CHANNEL channel);\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);\r
+\r
+// copy / paste / composite routines\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, int left, int top, int right, int bottom);\r
+DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);\r
+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
+DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);\r
+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
+DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib);\r
+\r
+// background filling routines\r
+DLL_API BOOL DLL_CALLCONV FreeImage_FillBackground(FIBITMAP *dib, const void *color, int options FI_DEFAULT(0));\r
+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
+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
+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
+\r
+// miscellaneous algorithms\r
+DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian, int ncycle FI_DEFAULT(3));\r
+\r
+// restore the borland-specific enum size option\r
+#if defined(__BORLANDC__)\r
+#pragma option pop\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif // FREEIMAGE_H\r