]> git.sesse.net Git - casparcg/commitdiff
- Added FreeImage for future versions
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 25 Jul 2010 17:20:17 +0000 (17:20 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Sun, 25 Jul 2010 17:20:17 +0000 (17:20 +0000)
FreeImage/Dist/FreeImage.dll [new file with mode: 0644]
FreeImage/Dist/FreeImage.h [new file with mode: 0644]
FreeImage/Dist/FreeImage.lib [new file with mode: 0644]
FreeImage/Dist/delete.me [new file with mode: 0644]
FreeImage/FreeImage3131.pdf [new file with mode: 0644]
FreeImage/README.minGW [new file with mode: 0644]
FreeImage/license-fi.txt [new file with mode: 0644]
FreeImage/license-gpl.txt [new file with mode: 0644]

diff --git a/FreeImage/Dist/FreeImage.dll b/FreeImage/Dist/FreeImage.dll
new file mode 100644 (file)
index 0000000..d6fbf5d
Binary files /dev/null and b/FreeImage/Dist/FreeImage.dll differ
diff --git a/FreeImage/Dist/FreeImage.h b/FreeImage/Dist/FreeImage.h
new file mode 100644 (file)
index 0000000..b61f1e1
--- /dev/null
@@ -0,0 +1,1090 @@
+// ==========================================================\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
diff --git a/FreeImage/Dist/FreeImage.lib b/FreeImage/Dist/FreeImage.lib
new file mode 100644 (file)
index 0000000..33927a8
Binary files /dev/null and b/FreeImage/Dist/FreeImage.lib differ
diff --git a/FreeImage/Dist/delete.me b/FreeImage/Dist/delete.me
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/FreeImage/FreeImage3131.pdf b/FreeImage/FreeImage3131.pdf
new file mode 100644 (file)
index 0000000..6f9a2db
Binary files /dev/null and b/FreeImage/FreeImage3131.pdf differ
diff --git a/FreeImage/README.minGW b/FreeImage/README.minGW
new file mode 100644 (file)
index 0000000..30195c3
--- /dev/null
@@ -0,0 +1,236 @@
+=====================================================================\r
+Using the FreeImage library with the MinGW Compiler Suite\r
+=====================================================================\r
+\r
+This file describes how to use the precompiled FreeImage library\r
+FreeImage.dll with the MinGW port of the GNU Compiler Collection\r
+(GCC), how to build this library from source using MinGW and how\r
+to use this MinGW-built library with Microsoft Visual Studio.\r
+\r
+Contents:\r
+\r
+I. Prerequisites\r
+\r
+1. Using the precompiled FreeImage library with MinGW\r
+\r
+2. Building the FreeImage library with MinGW\r
+\r
+3. Using the MinGW FreeImage library with Microsoft Visual Studio\r
+\r
+4. Useful links\r
+\r
+\r
+---------------------------------------------------------------------\r
+I. Prerequisites\r
+=====================================================================\r
+\r
+The procedures described in this document have been developed and\r
+tested using the following free tools:\r
+\r
+1. MinGW GCC Version 4.4.0 (Core and C++ including required libs)\r
+2. MinGW GNU Binutils Version 2.19.1\r
+3. MinGW GNU Make Version 3.81-20080326-3\r
+4. MinGW Runtime Version 3.15.2\r
+5. MinGW API for MS-Windows Version 3.13\r
+6. GnuWin32 Package CoreUtils Version 5.3.0 (only for building)\r
+7. GnuWin32 Package Sed Version 4.2 (only for creating the GCC\r
+   import library)*\r
+\r
+* Sed is only needed to create a GCC-native import library from\r
+  the MSVC import library FreeImage.lib. However, since MinGW now\r
+  supports linking against MSVC lib files, this process seems to\r
+  be obsolete. See section 1.\r
+\r
+Basically, no version dependent capabilities are used so, this\r
+should also work with older versions of the tools mentioned above.\r
+Similarly, the GnuWin32 packages (which I just prefer over MSYS)\r
+could likely be replaced by a properly installed MSYS environment.\r
+\r
+Furthermore, the following preconditions should be met:\r
+\r
+1. The folders 'bin' under both the MinGW and the GnuWin32\r
+   installation directory should have been added to the PATH\r
+   environment variable. Likely it is best adding these\r
+   directories permanently to PATH through the System\r
+   Properties dialog on the Control Panel.\r
+\r
+2. The MinGW Make package only provides a 'mingw32-make.exe'\r
+   executable. There is no alias 'make.exe'. However, make is\r
+   preconfigured to use 'make' as the default $(MAKE) command.\r
+   This seems to be a bug in the MinGW GNU Make distribution.\r
+   Thus, a copy of 'mingw32-make.exe' named 'make.exe' should\r
+   be placed into MinGW's 'bin' directory.\r
+\r
+\r
+\r
+---------------------------------------------------------------------\r
+1. Using the precompiled FreeImage library with MinGW\r
+=====================================================================\r
+\r
+When using functions from C/C++, that reside in a DLL, the linker\r
+needs a so called import library, which specifies, how to\r
+dynamically link these external functions during runtime. However,\r
+different linkers use different types or formats of these import\r
+libraries.\r
+\r
+Since the precompiled FreeImage library was build with Microsoft\r
+Visual Studio, in the past, some extra work was required to use it\r
+from MinGW. An import library, that was compatible with GNU ld,\r
+must have been created first.\r
+\r
+However, for several MinGW versions, the GNU linker ld also\r
+supports linking against Microsoft Visual C++ import libraries\r
+directly. So, this effectively makes any circulating HOWTO's on\r
+how to create a GCC-compatible import library from a MSVC lib file\r
+more or less obsolete. Additionally, MinGW does not require the\r
+GCC/Linux usual lib prefix for libraries, so linking with MinGW\r
+against the precompiled FreeImage DLL is as easy as with MSVC:\r
+\r
+1.) Open a DOS shell (run application cmd.exe)\r
+\r
+2.) Ensure, that the 'bin' folder of MinGW is added to the PATH\r
+    environment variable (see Prerequisites).\r
+\r
+3.) Link directly against the supplied lib file:\r
+\r
+    C:\>gcc -oFreeImageTest.exe FreeImageTest.c -lFreeImage\r
+\r
+Nonetheless, for the sake of completeness, the following steps\r
+describe how to create a native GCC import library:\r
+\r
+1.) Open a DOS shell (run application cmd.exe)\r
+\r
+2.) Ensure, that the 'bin' folders of both MinGW and GnuWin32 are\r
+    added to the PATH environment variable (see Prerequisites).\r
+\r
+3.) Create a .def file 'libfreeimage.def', that contains all symbols\r
+    exported by the FreeImage library:\r
+\r
+    C:\>pexports FreeImage.dll | sed "s/^_//" > libfreeimage.def\r
+\r
+4.) Create the GCC compatible import library 'libfreeimage.a':\r
+\r
+    C:\>dlltool --add-underscore -d libfreeimage.def -l libfreeimage.a\r
+\r
+5.) Use this library to link against with GCC:\r
+\r
+    C:\>gcc -oFreeImageTest.exe FreeImageTest.c -lfreeimage\r
+\r
+\r
+\r
+---------------------------------------------------------------------\r
+2. Building the FreeImage library with MinGW\r
+=====================================================================\r
+\r
+You *do not* need to have any other third party library (like\r
+libjpeg, libpng, libtiff, libmng and zlib and others) installed on\r
+your system in order to compile and use the library. FreeImage uses\r
+its own versions of these libraries. This way, you can be sure that\r
+FreeImage will always use the latest and properly tested versions\r
+of of these third party libraries.\r
+\r
+In order to build the FreeImage library under Windows with MinGW\r
+(GCC), ensure that all the prerequisites mentioned above are met.\r
+The MinGW makefile aims to build a Windows DLL, that differs as\r
+least as possible from the precompiled library that comes with the\r
+FreeImage distribution. Thus, the build process also includes the\r
+DLL version resource as well as the __stdcall attribute for all the\r
+exported functions, including the MSVC-like function decorations\r
+_FuncName@nn.\r
+\r
+When building the FreeImage DLL, of course, an import library is\r
+generated, too. However, this input library is not in GCC's native\r
+format, but in MSVC lib format, which makes it usable from both\r
+MinGW and Microsoft Visual Studio with no further processing.\r
+\r
+The MinGW makefile can also be used to build a static library.\r
+However, due to the different function export attributes needed\r
+for both the dynamic and the shared library (DLL), this requires\r
+a separate invocation of make, which in turn needs to rebuild every\r
+source file after switching from dynamic to static and vice versa.\r
+So, a 'make clean' is required each time, the library type is\r
+changed.\r
+\r
+The type of library to build is specified by a variable named\r
+FREEIMAGE_LIBRARY_TYPE, which may either be set directly in the\r
+Makefile.mingw near line 18 or may be specified as an environment\r
+variable. This variable may either take SHARED or STATIC to build\r
+a dynamic link library (DLL) or a static library respectively.\r
+Since this value is used to dynamically form the actual make target\r
+internally, only uppercase values are valid. Defaults to SHARED.\r
+\r
+The MinGW makefile also supports the 'install' target. However,\r
+this only copies the FreeImage dynamic link library (DLL) from the\r
+Dist folder into the %SystemRoot%\system32 folder. So, invoking this\r
+target only makes sense, if the DLL has been built before.\r
+\r
+Since there is neither a common system wide 'include' nor a 'lib'\r
+directory available under Windows, the FreeImage header file\r
+FreeImage.h as well as both the static library and the DLL import\r
+library FreeImage.lib just remain in the 'Dist' folder.\r
+\r
+The following procedure creates the FreeImage dynamic link library\r
+(DLL) from the sources, installs it and also creates a static\r
+FreeImage library:\r
+\r
+1.) Open a DOS shell (run application cmd.exe)\r
+\r
+2.) Ensure, that the 'bin' folders of both MinGW and GnuWin32 are\r
+    added to the PATH environment variable (see Prerequisites).\r
+\r
+3.) Create the FreeImage dynamic link library (DLL):\r
+\r
+    C:\>make\r
+\r
+4.) Install the FreeImage dynamic link library (DLL):\r
+\r
+    C:\>make install\r
+\r
+5.) Clean all files produced by the recent build process:\r
+\r
+    C:\>make clean\r
+\r
+6.) Create a static FreeImage library:\r
+\r
+    C:\>set FREEIMAGE_LIBRARY_TYPE=STATIC\r
+    C:\>make\r
+\r
+You should be able to link progams with the -lFreeImage option\r
+after the shared library is compiled and installed. You can also\r
+link statically against FreeImage.a from MinGW.\r
+\r
+\r
+\r
+---------------------------------------------------------------------\r
+3. Using the MinGW FreeImage library with Microsoft Visual Studio\r
+=====================================================================\r
+\r
+Since the MinGW makefile creates an import library in MSVC's lib\r
+format, the produced shared library (DLL) can be used from both\r
+MinGW and Microsoft Visual Studio with no further adaption. Just\r
+link to the import library FreeImage.lib from either MinGW or\r
+Microsoft Visual Studio.\r
+\r
+\r
+\r
+---------------------------------------------------------------------\r
+4. Useful links\r
+=====================================================================\r
+\r
+- The MinGW homepage:\r
+     http://www.mingw.org/\r
+\r
+- The GnuWin32 homepage:\r
+     http://gnuwin32.sourceforge.net/\r
+\r
+- The GCC homepage and online documentation:\r
+     http://gcc.gnu.org/\r
+     http://gcc.gnu.org/onlinedocs/\r
+\r
+- The GNU Binutils homepage and online documentation:\r
+     http://www.gnu.org/software/binutils/\r
+     http://sourceware.org/binutils/docs-2.19/\r
+\r
+- The GNU Make homepage and online documentation:\r
+     http://www.gnu.org/software/make/\r
+     http://www.gnu.org/software/make/manual/make.html\r
diff --git a/FreeImage/license-fi.txt b/FreeImage/license-fi.txt
new file mode 100644 (file)
index 0000000..03b666c
--- /dev/null
@@ -0,0 +1,142 @@
+FreeImage Public License - Version 1.0\r
+---------------------------------------------\r
+\r
+1. Definitions.\r
+\r
+1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications.\r
+\r
+1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.\r
+\r
+1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.\r
+\r
+1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data.\r
+\r
+1.5. "Executable" means Covered Code in any form other than Source Code.\r
+\r
+1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.\r
+\r
+1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.\r
+\r
+1.8. "License" means this document.\r
+\r
+1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a\r
+Modification is:\r
+\r
+A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.\r
+\r
+B. Any new file that contains any part of the Original Code or previous Modifications.\r
+\r
+1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.\r
+\r
+1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control\r
+compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.\r
+\r
+1.12. "You" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the\r
+direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity.\r
+\r
+2. Source Code License.\r
+\r
+2.1. The Initial Developer Grant.\r
+The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:\r
+\r
+(a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and\r
+\r
+(b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell ("Utilize") the Original Code (or portions thereof), but solely to the extent that\r
+any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or\r
+combinations.\r
+\r
+2.2. Contributor Grant.\r
+Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:\r
+\r
+(a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and\r
+\r
+(b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that\r
+may be necessary to Utilize further Modifications or combinations.\r
+\r
+3. Distribution Obligations.\r
+\r
+3.1. Application of License.\r
+The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or\r
+restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.\r
+\r
+3.2. Availability of Source Code.\r
+Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.\r
+\r
+3.3. Description of Modifications.\r
+You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.\r
+\r
+3.4. Intellectual Property Matters\r
+\r
+(a) Third Party Claims.\r
+If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make\r
+available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.\r
+\r
+(b) Contributor APIs.\r
+If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file.\r
+\r
+3.5. Required Notices.\r
+You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its\r
+structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or\r
+liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of\r
+warranty, support, indemnity or liability terms You offer.\r
+\r
+3.6. Distribution of Executable Versions.\r
+You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You\r
+describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License,\r
+provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.\r
+\r
+3.7. Larger Works.\r
+You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.\r
+\r
+4. Inability to Comply Due to Statute or Regulation.\r
+\r
+If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.\r
+\r
+5. Application of this License.\r
+\r
+This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code.\r
+\r
+6. Versions of the License.\r
+\r
+6.1. New Versions.\r
+Floris van den Berg may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.\r
+\r
+6.2. Effect of New Versions.\r
+Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Floris van den Berg\r
+No one other than Floris van den Berg has the right to modify the terms applicable to Covered Code created under this License.\r
+\r
+6.3. Derivative Works.\r
+If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases "FreeImage", `FreeImage Public License", "FIPL", or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the FreeImage Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)\r
+\r
+7. DISCLAIMER OF WARRANTY.\r
+\r
+COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.\r
+\r
+8. TERMINATION.\r
+\r
+This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.\r
+\r
+9. LIMITATION OF LIABILITY.\r
+\r
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE\r
+EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.\r
+\r
+10. U.S. GOVERNMENT END USERS.\r
+\r
+The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.\r
+\r
+11. MISCELLANEOUS.\r
+\r
+This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by Dutch law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the The Netherlands: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Almelo, The Netherlands; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the court of Almelo, The Netherlands with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.\r
+\r
+12. RESPONSIBILITY FOR CLAIMS.\r
+\r
+Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based\r
+on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute\r
+responsibility on an equitable basis.\r
+\r
+EXHIBIT A.\r
+\r
+"The contents of this file are subject to the FreeImage Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://home.wxs.nl/~flvdberg/freeimage-license.txt\r
+\r
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. 
\ No newline at end of file
diff --git a/FreeImage/license-gpl.txt b/FreeImage/license-gpl.txt
new file mode 100644 (file)
index 0000000..7d1f860
--- /dev/null
@@ -0,0 +1,342 @@
+                   GNU GENERAL PUBLIC LICENSE\r
+                      Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.\r
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users.  This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it.  (Some other Free Software Foundation software is covered by\r
+the GNU Library General Public License instead.)  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have.  You must make sure that they, too, receive or can get the\r
+source code.  And you must show them these terms so they know their\r
+rights.\r
+\r
+  We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+  Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software.  If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary.  To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\f\r
+                   GNU GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License.  The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language.  (Hereinafter, translation is included without limitation in\r
+the term "modification".)  Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+  2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) You must cause the modified files to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    b) You must cause any work that you distribute or publish, that in\r
+    whole or in part contains or is derived from the Program or any\r
+    part thereof, to be licensed as a whole at no charge to all third\r
+    parties under the terms of this License.\r
+\r
+    c) If the modified program normally reads commands interactively\r
+    when run, you must cause it, when started running for such\r
+    interactive use in the most ordinary way, to print or display an\r
+    announcement including an appropriate copyright notice and a\r
+    notice that there is no warranty (or else, saying that you provide\r
+    a warranty) and that users may redistribute the program under\r
+    these conditions, and telling the user how to view a copy of this\r
+    License.  (Exception: if the Program itself is interactive but\r
+    does not normally print such an announcement, your work based on\r
+    the Program is not required to print an announcement.)\r
+\f\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+    a) Accompany it with the complete corresponding machine-readable\r
+    source code, which must be distributed under the terms of Sections\r
+    1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+    b) Accompany it with a written offer, valid for at least three\r
+    years, to give any third party, for a charge no more than your\r
+    cost of physically performing source distribution, a complete\r
+    machine-readable copy of the corresponding source code, to be\r
+    distributed under the terms of Sections 1 and 2 above on a medium\r
+    customarily used for software interchange; or,\r
+\r
+    c) Accompany it with the information you received as to the offer\r
+    to distribute corresponding source code.  (This alternative is\r
+    allowed only for noncommercial distribution and only if you\r
+    received the program in object code or executable form with such\r
+    an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it.  For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable.  However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\f\r
+  4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License.  Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+  5. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+  6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+  7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\f\r
+  8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded.  In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+  9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation.  If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+  10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission.  For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this.  Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\f\r
+           How to Apply These Terms to Your New Programs\r
+\r
+  If you develop a new program, and you want it to be of the greatest\r
+possible use to the public, the best way to achieve this is to make it\r
+free software which everyone can redistribute and change under these terms.\r
+\r
+  To do so, attach the following notices to the program.  It is safest\r
+to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least\r
+the "copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the program's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation; either version 2 of the License, or\r
+    (at your option) any later version.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with this program; if not, write to the Free Software\r
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+If the program is interactive, make it output a short notice like this\r
+when it starts in an interactive mode:\r
+\r
+    Gnomovision version 69, Copyright (C) year name of author\r
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\r
+    This is free software, and you are welcome to redistribute it\r
+    under certain conditions; type `show c' for details.\r
+\r
+The hypothetical commands `show w' and `show c' should show the appropriate\r
+parts of the General Public License.  Of course, the commands you use may\r
+be called something other than `show w' and `show c'; they could even be\r
+mouse-clicks or menu items--whatever suits your program.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the program, if\r
+necessary.  Here is a sample; alter the names:\r
+\r
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\r
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.\r
+\r
+  <signature of Ty Coon>, 1 April 1989\r
+  Ty Coon, President of Vice\r
+\r
+This General Public License does not permit incorporating your program into\r
+proprietary programs.  If your program is a subroutine library, you may\r
+consider it more useful to permit linking proprietary applications with the\r
+library.  If this is what you want to do, use the GNU Library General\r
+Public License instead of this License.\r
+\r
+\r