Files
DSMeshConvert/DSTexCompress/FreeImage/Wrapper/FreeImagePlus/doc/FreeImage_8h-source.html
2012-09-02 15:24:38 +02:00

1059 lines
124 KiB
HTML

<HTML>
<HEAD>
<TITLE>FreeImagePlus</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="classes.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>FreeImage.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ==========================================================</span>
<a name="l00002"></a>00002 <span class="comment">// FreeImage 3</span>
<a name="l00003"></a>00003 <span class="comment">//</span>
<a name="l00004"></a>00004 <span class="comment">// Design and implementation by</span>
<a name="l00005"></a>00005 <span class="comment">// - Floris van den Berg (flvdberg@wxs.nl)</span>
<a name="l00006"></a>00006 <span class="comment">// - Hervé Drolon (drolon@infonie.fr)</span>
<a name="l00007"></a>00007 <span class="comment">//</span>
<a name="l00008"></a>00008 <span class="comment">// Contributors:</span>
<a name="l00009"></a>00009 <span class="comment">// - see changes log named 'Whatsnew.txt', see header of each .h and .cpp file</span>
<a name="l00010"></a>00010 <span class="comment">//</span>
<a name="l00011"></a>00011 <span class="comment">// This file is part of FreeImage 3</span>
<a name="l00012"></a>00012 <span class="comment">//</span>
<a name="l00013"></a>00013 <span class="comment">// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY</span>
<a name="l00014"></a>00014 <span class="comment">// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES</span>
<a name="l00015"></a>00015 <span class="comment">// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE</span>
<a name="l00016"></a>00016 <span class="comment">// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED</span>
<a name="l00017"></a>00017 <span class="comment">// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT</span>
<a name="l00018"></a>00018 <span class="comment">// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY</span>
<a name="l00019"></a>00019 <span class="comment">// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL</span>
<a name="l00020"></a>00020 <span class="comment">// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER</span>
<a name="l00021"></a>00021 <span class="comment">// THIS DISCLAIMER.</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">// Use at your own risk!</span>
<a name="l00024"></a>00024 <span class="comment">// ==========================================================</span>
<a name="l00025"></a>00025
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef FREEIMAGE_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define FREEIMAGE_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span>
<a name="l00029"></a>00029 <span class="comment">// Version information ------------------------------------------------------</span>
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="preprocessor">#define FREEIMAGE_MAJOR_VERSION 3</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define FREEIMAGE_MINOR_VERSION 14</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define FREEIMAGE_RELEASE_SERIAL 0</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="comment">// Compiler options ---------------------------------------------------------</span>
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;wchar.h&gt;</span> <span class="comment">// needed for UNICODE functions</span>
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="preprocessor">#if defined(FREEIMAGE_LIB)</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor"> #define DLL_API</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor"> #define DLL_CALLCONV</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor"> #if defined(_WIN32) || defined(__WIN32__)</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor"> #define DLL_CALLCONV __stdcall</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span> <span class="comment">// The following ifdef block is the standard way of creating macros which make exporting </span>
<a name="l00046"></a>00046 <span class="comment">// from a DLL simpler. All files within this DLL are compiled with the FREEIMAGE_EXPORTS</span>
<a name="l00047"></a>00047 <span class="comment">// symbol defined on the command line. this symbol should not be defined on any project</span>
<a name="l00048"></a>00048 <span class="comment">// that uses this DLL. This way any other project whose source files include this file see </span>
<a name="l00049"></a>00049 <span class="comment">// DLL_API functions as being imported from a DLL, wheras this DLL sees symbols</span>
<a name="l00050"></a>00050 <span class="comment">// defined with this macro as being exported.</span>
<a name="l00051"></a>00051 <span class="preprocessor"> #ifdef FREEIMAGE_EXPORTS</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor"> #define DLL_API __declspec(dllexport)</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor"> #define DLL_API __declspec(dllimport)</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor"> #endif // FREEIMAGE_EXPORTS</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor"> #else </span>
<a name="l00057"></a>00057 <span class="preprocessor"></span> <span class="comment">// try the gcc visibility support (see http://gcc.gnu.org/wiki/Visibility)</span>
<a name="l00058"></a>00058 <span class="preprocessor"> #if defined(__GNUC__) &amp;&amp; ((__GNUC__ &gt;= 4) || (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4))</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor"> #ifndef GCC_HASCLASSVISIBILITY</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor"> #define GCC_HASCLASSVISIBILITY</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor"> #endif</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor"> #endif // __GNUC__</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor"> #define DLL_CALLCONV</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor"> #if defined(GCC_HASCLASSVISIBILITY)</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor"> #define DLL_API __attribute__ ((visibility("default")))</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor"> #define DLL_API</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor"> #endif </span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor"> #endif // WIN32 / !WIN32</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#endif // FREEIMAGE_LIB</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span>
<a name="l00072"></a>00072 <span class="comment">// Some versions of gcc may have BYTE_ORDER or __BYTE_ORDER defined</span>
<a name="l00073"></a>00073 <span class="comment">// If your big endian system isn't being detected, add an OS specific check</span>
<a name="l00074"></a>00074 <span class="preprocessor">#if (defined(BYTE_ORDER) &amp;&amp; BYTE_ORDER==BIG_ENDIAN) || \</span>
<a name="l00075"></a>00075 <span class="preprocessor"> (defined(__BYTE_ORDER) &amp;&amp; __BYTE_ORDER==__BIG_ENDIAN) || \</span>
<a name="l00076"></a>00076 <span class="preprocessor"> defined(__BIG_ENDIAN__)</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define FREEIMAGE_BIGENDIAN</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#endif // BYTE_ORDER</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span>
<a name="l00080"></a>00080 <span class="comment">// This really only affects 24 and 32 bit formats, the rest are always RGB order.</span>
<a name="l00081"></a>00081 <span class="preprocessor">#define FREEIMAGE_COLORORDER_BGR 0</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#define FREEIMAGE_COLORORDER_RGB 1</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#if defined(FREEIMAGE_BIGENDIAN)</span>
<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_RGB</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#define FREEIMAGE_COLORORDER FREEIMAGE_COLORORDER_BGR</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span>
<a name="l00089"></a>00089 <span class="comment">// Ensure 4-byte enums if we're using Borland C++ compilers</span>
<a name="l00090"></a>00090 <span class="preprocessor">#if defined(__BORLANDC__)</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#pragma option push -b</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span>
<a name="l00094"></a>00094 <span class="comment">// For C compatibility --------------------------------------------------------</span>
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#define FI_DEFAULT(x) = x</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#define FI_ENUM(x) enum x</span>
<a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#define FI_STRUCT(x) struct x</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#define FI_DEFAULT(x)</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#define FI_ENUM(x) typedef int x; enum x</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#define FI_STRUCT(x) typedef struct x x; struct x</span>
<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span>
<a name="l00106"></a>00106 <span class="comment">// Bitmap types -------------------------------------------------------------</span>
<a name="l00107"></a>00107
<a name="l00108"></a>00108 FI_STRUCT (FIBITMAP) { <span class="keywordtype">void</span> *data; };
<a name="l00109"></a>00109 FI_STRUCT (FIMULTIBITMAP) { <span class="keywordtype">void</span> *data; };
<a name="l00110"></a>00110
<a name="l00111"></a>00111 <span class="comment">// Types used in the library (directly copied from Windows) -----------------</span>
<a name="l00112"></a>00112
<a name="l00113"></a>00113 <span class="preprocessor">#if defined(__MINGW32__) &amp;&amp; defined(_WINDOWS_H)</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">#define _WINDOWS_ // prevent a bug in MinGW32</span>
<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#endif // __MINGW32__</span>
<a name="l00116"></a>00116 <span class="preprocessor"></span>
<a name="l00117"></a>00117 <span class="preprocessor">#ifndef _WINDOWS_</span>
<a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define _WINDOWS_</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span>
<a name="l00120"></a>00120 <span class="preprocessor">#ifndef FALSE</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span><span class="preprocessor">#define FALSE 0</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#ifndef TRUE</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span><span class="preprocessor">#define TRUE 1</span>
<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#ifndef NULL</span>
<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#define NULL 0</span>
<a name="l00128"></a>00128 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00129"></a>00129 <span class="preprocessor"></span>
<a name="l00130"></a>00130 <span class="preprocessor">#ifndef SEEK_SET</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#define SEEK_SET 0</span>
<a name="l00132"></a>00132 <span class="preprocessor"></span><span class="preprocessor">#define SEEK_CUR 1</span>
<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#define SEEK_END 2</span>
<a name="l00134"></a>00134 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00135"></a>00135 <span class="preprocessor"></span>
<a name="l00136"></a>00136 <span class="preprocessor">#ifndef _MSC_VER</span>
<a name="l00137"></a>00137 <span class="preprocessor"></span><span class="comment">// define portable types for 32-bit / 64-bit OS</span>
<a name="l00138"></a>00138 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00139"></a>00139 <span class="keyword">typedef</span> int32_t BOOL;
<a name="l00140"></a>00140 <span class="keyword">typedef</span> uint8_t BYTE;
<a name="l00141"></a>00141 <span class="keyword">typedef</span> uint16_t WORD;
<a name="l00142"></a>00142 <span class="keyword">typedef</span> uint32_t DWORD;
<a name="l00143"></a>00143 <span class="keyword">typedef</span> int32_t LONG;
<a name="l00144"></a>00144 <span class="preprocessor">#else</span>
<a name="l00145"></a>00145 <span class="preprocessor"></span><span class="comment">// MS is not C99 ISO compliant</span>
<a name="l00146"></a>00146 <span class="keyword">typedef</span> <span class="keywordtype">long</span> BOOL;
<a name="l00147"></a>00147 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> BYTE;
<a name="l00148"></a>00148 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> WORD;
<a name="l00149"></a>00149 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> DWORD;
<a name="l00150"></a>00150 <span class="keyword">typedef</span> <span class="keywordtype">long</span> LONG;
<a name="l00151"></a>00151 <span class="preprocessor">#endif // _MSC_VER</span>
<a name="l00152"></a>00152 <span class="preprocessor"></span>
<a name="l00153"></a>00153 <span class="preprocessor">#if (defined(_WIN32) || defined(__WIN32__))</span>
<a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(push, 1)</span>
<a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00156"></a>00156 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(1)</span>
<a name="l00157"></a>00157 <span class="preprocessor"></span><span class="preprocessor">#endif // WIN32</span>
<a name="l00158"></a>00158 <span class="preprocessor"></span>
<a name="l00159"></a>00159 <span class="keyword">typedef</span> <span class="keyword">struct </span>tagRGBQUAD {
<a name="l00160"></a>00160 <span class="preprocessor">#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR</span>
<a name="l00161"></a>00161 <span class="preprocessor"></span> BYTE rgbBlue;
<a name="l00162"></a>00162 BYTE rgbGreen;
<a name="l00163"></a>00163 BYTE rgbRed;
<a name="l00164"></a>00164 <span class="preprocessor">#else</span>
<a name="l00165"></a>00165 <span class="preprocessor"></span> BYTE rgbRed;
<a name="l00166"></a>00166 BYTE rgbGreen;
<a name="l00167"></a>00167 BYTE rgbBlue;
<a name="l00168"></a>00168 <span class="preprocessor">#endif // FREEIMAGE_COLORORDER</span>
<a name="l00169"></a>00169 <span class="preprocessor"></span> BYTE rgbReserved;
<a name="l00170"></a>00170 } RGBQUAD;
<a name="l00171"></a>00171
<a name="l00172"></a>00172 <span class="keyword">typedef</span> <span class="keyword">struct </span>tagRGBTRIPLE {
<a name="l00173"></a>00173 <span class="preprocessor">#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR</span>
<a name="l00174"></a>00174 <span class="preprocessor"></span> BYTE rgbtBlue;
<a name="l00175"></a>00175 BYTE rgbtGreen;
<a name="l00176"></a>00176 BYTE rgbtRed;
<a name="l00177"></a>00177 <span class="preprocessor">#else</span>
<a name="l00178"></a>00178 <span class="preprocessor"></span> BYTE rgbtRed;
<a name="l00179"></a>00179 BYTE rgbtGreen;
<a name="l00180"></a>00180 BYTE rgbtBlue;
<a name="l00181"></a>00181 <span class="preprocessor">#endif // FREEIMAGE_COLORORDER</span>
<a name="l00182"></a>00182 <span class="preprocessor"></span>} RGBTRIPLE;
<a name="l00183"></a>00183
<a name="l00184"></a>00184 <span class="preprocessor">#if (defined(_WIN32) || defined(__WIN32__))</span>
<a name="l00185"></a>00185 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(pop)</span>
<a name="l00186"></a>00186 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00187"></a>00187 <span class="preprocessor"></span><span class="preprocessor">#pragma pack()</span>
<a name="l00188"></a>00188 <span class="preprocessor"></span><span class="preprocessor">#endif // WIN32</span>
<a name="l00189"></a>00189 <span class="preprocessor"></span>
<a name="l00190"></a>00190 <span class="keyword">typedef</span> <span class="keyword">struct </span>tagBITMAPINFOHEADER{
<a name="l00191"></a>00191 DWORD biSize;
<a name="l00192"></a>00192 LONG biWidth;
<a name="l00193"></a>00193 LONG biHeight;
<a name="l00194"></a>00194 WORD biPlanes;
<a name="l00195"></a>00195 WORD biBitCount;
<a name="l00196"></a>00196 DWORD biCompression;
<a name="l00197"></a>00197 DWORD biSizeImage;
<a name="l00198"></a>00198 LONG biXPelsPerMeter;
<a name="l00199"></a>00199 LONG biYPelsPerMeter;
<a name="l00200"></a>00200 DWORD biClrUsed;
<a name="l00201"></a>00201 DWORD biClrImportant;
<a name="l00202"></a>00202 } BITMAPINFOHEADER, *PBITMAPINFOHEADER;
<a name="l00203"></a>00203
<a name="l00204"></a>00204 <span class="keyword">typedef</span> <span class="keyword">struct </span>tagBITMAPINFO {
<a name="l00205"></a>00205 BITMAPINFOHEADER bmiHeader;
<a name="l00206"></a>00206 RGBQUAD bmiColors[1];
<a name="l00207"></a>00207 } BITMAPINFO, *PBITMAPINFO;
<a name="l00208"></a>00208
<a name="l00209"></a>00209 <span class="preprocessor">#endif // _WINDOWS_</span>
<a name="l00210"></a>00210 <span class="preprocessor"></span>
<a name="l00211"></a>00211 <span class="comment">// Types used in the library (specific to FreeImage) ------------------------</span>
<a name="l00212"></a>00212
<a name="l00213"></a>00213 <span class="preprocessor">#if (defined(_WIN32) || defined(__WIN32__))</span>
<a name="l00214"></a>00214 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(push, 1)</span>
<a name="l00215"></a>00215 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00216"></a>00216 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(1)</span>
<a name="l00217"></a>00217 <span class="preprocessor"></span><span class="preprocessor">#endif // WIN32</span>
<a name="l00218"></a>00218 <span class="preprocessor"></span>
<a name="l00221"></a><a class="code" href="structtagFIRGB16.html">00221</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structtagFIRGB16.html" title="48-bit RGB">tagFIRGB16</a> {
<a name="l00222"></a>00222 WORD red;
<a name="l00223"></a>00223 WORD green;
<a name="l00224"></a>00224 WORD blue;
<a name="l00225"></a>00225 } <a class="code" href="structtagFIRGB16.html" title="48-bit RGB">FIRGB16</a>;
<a name="l00226"></a>00226
<a name="l00229"></a><a class="code" href="structtagFIRGBA16.html">00229</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structtagFIRGBA16.html" title="64-bit RGBA">tagFIRGBA16</a> {
<a name="l00230"></a>00230 WORD red;
<a name="l00231"></a>00231 WORD green;
<a name="l00232"></a>00232 WORD blue;
<a name="l00233"></a>00233 WORD alpha;
<a name="l00234"></a>00234 } <a class="code" href="structtagFIRGBA16.html" title="64-bit RGBA">FIRGBA16</a>;
<a name="l00235"></a>00235
<a name="l00238"></a><a class="code" href="structtagFIRGBF.html">00238</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structtagFIRGBF.html" title="96-bit RGB Float">tagFIRGBF</a> {
<a name="l00239"></a>00239 <span class="keywordtype">float</span> red;
<a name="l00240"></a>00240 <span class="keywordtype">float</span> green;
<a name="l00241"></a>00241 <span class="keywordtype">float</span> blue;
<a name="l00242"></a>00242 } <a class="code" href="structtagFIRGBF.html" title="96-bit RGB Float">FIRGBF</a>;
<a name="l00243"></a>00243
<a name="l00246"></a><a class="code" href="structtagFIRGBAF.html">00246</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structtagFIRGBAF.html" title="128-bit RGBA Float">tagFIRGBAF</a> {
<a name="l00247"></a>00247 <span class="keywordtype">float</span> red;
<a name="l00248"></a>00248 <span class="keywordtype">float</span> green;
<a name="l00249"></a>00249 <span class="keywordtype">float</span> blue;
<a name="l00250"></a>00250 <span class="keywordtype">float</span> alpha;
<a name="l00251"></a>00251 } <a class="code" href="structtagFIRGBAF.html" title="128-bit RGBA Float">FIRGBAF</a>;
<a name="l00252"></a>00252
<a name="l00255"></a><a class="code" href="structtagFICOMPLEX.html">00255</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structtagFICOMPLEX.html" title="Data structure for COMPLEX type (complex number).">tagFICOMPLEX</a> {
<a name="l00257"></a><a class="code" href="structtagFICOMPLEX.html#448818f3de56c81064bdcb1ba78a7ead">00257</a> <span class="keywordtype">double</span> <a class="code" href="structtagFICOMPLEX.html#448818f3de56c81064bdcb1ba78a7ead" title="real part">r</a>;
<a name="l00259"></a><a class="code" href="structtagFICOMPLEX.html#d2cc2cc6d32c1e5496f2c77e185d8218">00259</a> <span class="keywordtype">double</span> <a class="code" href="structtagFICOMPLEX.html#d2cc2cc6d32c1e5496f2c77e185d8218" title="imaginary part">i</a>;
<a name="l00260"></a>00260 } <a class="code" href="structtagFICOMPLEX.html" title="Data structure for COMPLEX type (complex number).">FICOMPLEX</a>;
<a name="l00261"></a>00261
<a name="l00262"></a>00262 <span class="preprocessor">#if (defined(_WIN32) || defined(__WIN32__))</span>
<a name="l00263"></a>00263 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(pop)</span>
<a name="l00264"></a>00264 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00265"></a>00265 <span class="preprocessor"></span><span class="preprocessor">#pragma pack()</span>
<a name="l00266"></a>00266 <span class="preprocessor"></span><span class="preprocessor">#endif // WIN32</span>
<a name="l00267"></a>00267 <span class="preprocessor"></span>
<a name="l00268"></a>00268 <span class="comment">// Indexes for byte arrays, masks and shifts for treating pixels as words ---</span>
<a name="l00269"></a>00269 <span class="comment">// These coincide with the order of RGBQUAD and RGBTRIPLE -------------------</span>
<a name="l00270"></a>00270
<a name="l00271"></a>00271 <span class="preprocessor">#ifndef FREEIMAGE_BIGENDIAN</span>
<a name="l00272"></a>00272 <span class="preprocessor"></span><span class="preprocessor">#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR</span>
<a name="l00273"></a>00273 <span class="preprocessor"></span><span class="comment">// Little Endian (x86 / MS Windows, Linux) : BGR(A) order</span>
<a name="l00274"></a>00274 <span class="preprocessor">#define FI_RGBA_RED 2</span>
<a name="l00275"></a>00275 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN 1</span>
<a name="l00276"></a>00276 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE 0</span>
<a name="l00277"></a>00277 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA 3</span>
<a name="l00278"></a>00278 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_RED_MASK 0x00FF0000</span>
<a name="l00279"></a>00279 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN_MASK 0x0000FF00</span>
<a name="l00280"></a>00280 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE_MASK 0x000000FF</span>
<a name="l00281"></a>00281 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA_MASK 0xFF000000</span>
<a name="l00282"></a>00282 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_RED_SHIFT 16</span>
<a name="l00283"></a>00283 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN_SHIFT 8</span>
<a name="l00284"></a>00284 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE_SHIFT 0</span>
<a name="l00285"></a>00285 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA_SHIFT 24</span>
<a name="l00286"></a>00286 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00287"></a>00287 <span class="preprocessor"></span><span class="comment">// Little Endian (x86 / MaxOSX) : RGB(A) order</span>
<a name="l00288"></a>00288 <span class="preprocessor">#define FI_RGBA_RED 0</span>
<a name="l00289"></a>00289 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN 1</span>
<a name="l00290"></a>00290 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE 2</span>
<a name="l00291"></a>00291 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA 3</span>
<a name="l00292"></a>00292 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_RED_MASK 0x000000FF</span>
<a name="l00293"></a>00293 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN_MASK 0x0000FF00</span>
<a name="l00294"></a>00294 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE_MASK 0x00FF0000</span>
<a name="l00295"></a>00295 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA_MASK 0xFF000000</span>
<a name="l00296"></a>00296 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_RED_SHIFT 0</span>
<a name="l00297"></a>00297 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN_SHIFT 8</span>
<a name="l00298"></a>00298 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE_SHIFT 16</span>
<a name="l00299"></a>00299 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA_SHIFT 24</span>
<a name="l00300"></a>00300 <span class="preprocessor"></span><span class="preprocessor">#endif // FREEIMAGE_COLORORDER</span>
<a name="l00301"></a>00301 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00302"></a>00302 <span class="preprocessor"></span><span class="preprocessor">#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR</span>
<a name="l00303"></a>00303 <span class="preprocessor"></span><span class="comment">// Big Endian (PPC / none) : BGR(A) order</span>
<a name="l00304"></a>00304 <span class="preprocessor">#define FI_RGBA_RED 2</span>
<a name="l00305"></a>00305 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN 1</span>
<a name="l00306"></a>00306 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE 0</span>
<a name="l00307"></a>00307 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA 3</span>
<a name="l00308"></a>00308 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_RED_MASK 0x0000FF00</span>
<a name="l00309"></a>00309 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN_MASK 0x00FF0000</span>
<a name="l00310"></a>00310 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE_MASK 0xFF000000</span>
<a name="l00311"></a>00311 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA_MASK 0x000000FF</span>
<a name="l00312"></a>00312 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_RED_SHIFT 8</span>
<a name="l00313"></a>00313 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN_SHIFT 16</span>
<a name="l00314"></a>00314 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE_SHIFT 24</span>
<a name="l00315"></a>00315 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA_SHIFT 0</span>
<a name="l00316"></a>00316 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="comment">// Big Endian (PPC / Linux, MaxOSX) : RGB(A) order</span>
<a name="l00318"></a>00318 <span class="preprocessor">#define FI_RGBA_RED 0</span>
<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN 1</span>
<a name="l00320"></a>00320 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE 2</span>
<a name="l00321"></a>00321 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA 3</span>
<a name="l00322"></a>00322 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_RED_MASK 0xFF000000</span>
<a name="l00323"></a>00323 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN_MASK 0x00FF0000</span>
<a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE_MASK 0x0000FF00</span>
<a name="l00325"></a>00325 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA_MASK 0x000000FF</span>
<a name="l00326"></a>00326 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_RED_SHIFT 24</span>
<a name="l00327"></a>00327 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_GREEN_SHIFT 16</span>
<a name="l00328"></a>00328 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_BLUE_SHIFT 8</span>
<a name="l00329"></a>00329 <span class="preprocessor"></span><span class="preprocessor">#define FI_RGBA_ALPHA_SHIFT 0</span>
<a name="l00330"></a>00330 <span class="preprocessor"></span><span class="preprocessor">#endif // FREEIMAGE_COLORORDER</span>
<a name="l00331"></a>00331 <span class="preprocessor"></span><span class="preprocessor">#endif // FREEIMAGE_BIGENDIAN</span>
<a name="l00332"></a>00332 <span class="preprocessor"></span>
<a name="l00333"></a>00333 <span class="preprocessor">#define FI_RGBA_RGB_MASK (FI_RGBA_RED_MASK|FI_RGBA_GREEN_MASK|FI_RGBA_BLUE_MASK)</span>
<a name="l00334"></a>00334 <span class="preprocessor"></span>
<a name="l00335"></a>00335 <span class="comment">// The 16bit macros only include masks and shifts, since each color element is not byte aligned</span>
<a name="l00336"></a>00336
<a name="l00337"></a>00337 <span class="preprocessor">#define FI16_555_RED_MASK 0x7C00</span>
<a name="l00338"></a>00338 <span class="preprocessor"></span><span class="preprocessor">#define FI16_555_GREEN_MASK 0x03E0</span>
<a name="l00339"></a>00339 <span class="preprocessor"></span><span class="preprocessor">#define FI16_555_BLUE_MASK 0x001F</span>
<a name="l00340"></a>00340 <span class="preprocessor"></span><span class="preprocessor">#define FI16_555_RED_SHIFT 10</span>
<a name="l00341"></a>00341 <span class="preprocessor"></span><span class="preprocessor">#define FI16_555_GREEN_SHIFT 5</span>
<a name="l00342"></a>00342 <span class="preprocessor"></span><span class="preprocessor">#define FI16_555_BLUE_SHIFT 0</span>
<a name="l00343"></a>00343 <span class="preprocessor"></span><span class="preprocessor">#define FI16_565_RED_MASK 0xF800</span>
<a name="l00344"></a>00344 <span class="preprocessor"></span><span class="preprocessor">#define FI16_565_GREEN_MASK 0x07E0</span>
<a name="l00345"></a>00345 <span class="preprocessor"></span><span class="preprocessor">#define FI16_565_BLUE_MASK 0x001F</span>
<a name="l00346"></a>00346 <span class="preprocessor"></span><span class="preprocessor">#define FI16_565_RED_SHIFT 11</span>
<a name="l00347"></a>00347 <span class="preprocessor"></span><span class="preprocessor">#define FI16_565_GREEN_SHIFT 5</span>
<a name="l00348"></a>00348 <span class="preprocessor"></span><span class="preprocessor">#define FI16_565_BLUE_SHIFT 0</span>
<a name="l00349"></a>00349 <span class="preprocessor"></span>
<a name="l00350"></a>00350 <span class="comment">// ICC profile support ------------------------------------------------------</span>
<a name="l00351"></a>00351
<a name="l00352"></a>00352 <span class="preprocessor">#define FIICC_DEFAULT 0x00</span>
<a name="l00353"></a>00353 <span class="preprocessor"></span><span class="preprocessor">#define FIICC_COLOR_IS_CMYK 0x01</span>
<a name="l00354"></a>00354 <span class="preprocessor"></span>
<a name="l00355"></a>00355 FI_STRUCT (FIICCPROFILE) {
<a name="l00356"></a>00356 WORD flags; <span class="comment">// info flag</span>
<a name="l00357"></a>00357 DWORD size; <span class="comment">// profile's size measured in bytes</span>
<a name="l00358"></a>00358 <span class="keywordtype">void</span> *data; <span class="comment">// points to a block of contiguous memory containing the profile</span>
<a name="l00359"></a>00359 };
<a name="l00360"></a>00360
<a name="l00361"></a>00361 <span class="comment">// Important enums ----------------------------------------------------------</span>
<a name="l00362"></a>00362
<a name="l00365"></a>00365 FI_ENUM(FREE_IMAGE_FORMAT) {
<a name="l00366"></a>00366 FIF_UNKNOWN = -1,
<a name="l00367"></a>00367 FIF_BMP = 0,
<a name="l00368"></a>00368 FIF_ICO = 1,
<a name="l00369"></a>00369 FIF_JPEG = 2,
<a name="l00370"></a>00370 FIF_JNG = 3,
<a name="l00371"></a>00371 FIF_KOALA = 4,
<a name="l00372"></a>00372 FIF_LBM = 5,
<a name="l00373"></a>00373 FIF_IFF = FIF_LBM,
<a name="l00374"></a>00374 FIF_MNG = 6,
<a name="l00375"></a>00375 FIF_PBM = 7,
<a name="l00376"></a>00376 FIF_PBMRAW = 8,
<a name="l00377"></a>00377 FIF_PCD = 9,
<a name="l00378"></a>00378 FIF_PCX = 10,
<a name="l00379"></a>00379 FIF_PGM = 11,
<a name="l00380"></a>00380 FIF_PGMRAW = 12,
<a name="l00381"></a>00381 FIF_PNG = 13,
<a name="l00382"></a>00382 FIF_PPM = 14,
<a name="l00383"></a>00383 FIF_PPMRAW = 15,
<a name="l00384"></a>00384 FIF_RAS = 16,
<a name="l00385"></a>00385 FIF_TARGA = 17,
<a name="l00386"></a>00386 FIF_TIFF = 18,
<a name="l00387"></a>00387 FIF_WBMP = 19,
<a name="l00388"></a>00388 FIF_PSD = 20,
<a name="l00389"></a>00389 FIF_CUT = 21,
<a name="l00390"></a>00390 FIF_XBM = 22,
<a name="l00391"></a>00391 FIF_XPM = 23,
<a name="l00392"></a>00392 FIF_DDS = 24,
<a name="l00393"></a>00393 FIF_GIF = 25,
<a name="l00394"></a>00394 FIF_HDR = 26,
<a name="l00395"></a>00395 FIF_FAXG3 = 27,
<a name="l00396"></a>00396 FIF_SGI = 28,
<a name="l00397"></a>00397 FIF_EXR = 29,
<a name="l00398"></a>00398 FIF_J2K = 30,
<a name="l00399"></a>00399 FIF_JP2 = 31,
<a name="l00400"></a>00400 FIF_PFM = 32,
<a name="l00401"></a>00401 FIF_PICT = 33,
<a name="l00402"></a>00402 FIF_RAW = 34
<a name="l00403"></a>00403 };
<a name="l00404"></a>00404
<a name="l00407"></a>00407 FI_ENUM(FREE_IMAGE_TYPE) {
<a name="l00408"></a>00408 FIT_UNKNOWN = 0, <span class="comment">// unknown type</span>
<a name="l00409"></a>00409 FIT_BITMAP = 1, <span class="comment">// standard image : 1-, 4-, 8-, 16-, 24-, 32-bit</span>
<a name="l00410"></a>00410 FIT_UINT16 = 2, <span class="comment">// array of unsigned short : unsigned 16-bit</span>
<a name="l00411"></a>00411 FIT_INT16 = 3, <span class="comment">// array of short : signed 16-bit</span>
<a name="l00412"></a>00412 FIT_UINT32 = 4, <span class="comment">// array of unsigned long : unsigned 32-bit</span>
<a name="l00413"></a>00413 FIT_INT32 = 5, <span class="comment">// array of long : signed 32-bit</span>
<a name="l00414"></a>00414 FIT_FLOAT = 6, <span class="comment">// array of float : 32-bit IEEE floating point</span>
<a name="l00415"></a>00415 FIT_DOUBLE = 7, <span class="comment">// array of double : 64-bit IEEE floating point</span>
<a name="l00416"></a>00416 FIT_COMPLEX = 8, <span class="comment">// array of FICOMPLEX : 2 x 64-bit IEEE floating point</span>
<a name="l00417"></a>00417 FIT_RGB16 = 9, <span class="comment">// 48-bit RGB image : 3 x 16-bit</span>
<a name="l00418"></a>00418 FIT_RGBA16 = 10, <span class="comment">// 64-bit RGBA image : 4 x 16-bit</span>
<a name="l00419"></a>00419 FIT_RGBF = 11, <span class="comment">// 96-bit RGB float image : 3 x 32-bit IEEE floating point</span>
<a name="l00420"></a>00420 FIT_RGBAF = 12 <span class="comment">// 128-bit RGBA float image : 4 x 32-bit IEEE floating point</span>
<a name="l00421"></a>00421 };
<a name="l00422"></a>00422
<a name="l00425"></a>00425 FI_ENUM(FREE_IMAGE_COLOR_TYPE) {
<a name="l00426"></a>00426 FIC_MINISWHITE = 0, <span class="comment">// min value is white</span>
<a name="l00427"></a>00427 FIC_MINISBLACK = 1, <span class="comment">// min value is black</span>
<a name="l00428"></a>00428 FIC_RGB = 2, <span class="comment">// RGB color model</span>
<a name="l00429"></a>00429 FIC_PALETTE = 3, <span class="comment">// color map indexed</span>
<a name="l00430"></a>00430 FIC_RGBALPHA = 4, <span class="comment">// RGB color model with alpha channel</span>
<a name="l00431"></a>00431 FIC_CMYK = 5 <span class="comment">// CMYK color model</span>
<a name="l00432"></a>00432 };
<a name="l00433"></a>00433
<a name="l00437"></a>00437 FI_ENUM(FREE_IMAGE_QUANTIZE) {
<a name="l00438"></a>00438 FIQ_WUQUANT = 0, <span class="comment">// Xiaolin Wu color quantization algorithm</span>
<a name="l00439"></a>00439 FIQ_NNQUANT = 1 <span class="comment">// NeuQuant neural-net quantization algorithm by Anthony Dekker</span>
<a name="l00440"></a>00440 };
<a name="l00441"></a>00441
<a name="l00445"></a>00445 FI_ENUM(FREE_IMAGE_DITHER) {
<a name="l00446"></a>00446 FID_FS = 0, <span class="comment">// Floyd &amp; Steinberg error diffusion</span>
<a name="l00447"></a>00447 FID_BAYER4x4 = 1, <span class="comment">// Bayer ordered dispersed dot dithering (order 2 dithering matrix)</span>
<a name="l00448"></a>00448 FID_BAYER8x8 = 2, <span class="comment">// Bayer ordered dispersed dot dithering (order 3 dithering matrix)</span>
<a name="l00449"></a>00449 FID_CLUSTER6x6 = 3, <span class="comment">// Ordered clustered dot dithering (order 3 - 6x6 matrix)</span>
<a name="l00450"></a>00450 FID_CLUSTER8x8 = 4, <span class="comment">// Ordered clustered dot dithering (order 4 - 8x8 matrix)</span>
<a name="l00451"></a>00451 FID_CLUSTER16x16= 5, <span class="comment">// Ordered clustered dot dithering (order 8 - 16x16 matrix)</span>
<a name="l00452"></a>00452 FID_BAYER16x16 = 6 <span class="comment">// Bayer ordered dispersed dot dithering (order 4 dithering matrix)</span>
<a name="l00453"></a>00453 };
<a name="l00454"></a>00454
<a name="l00458"></a>00458 FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
<a name="l00459"></a>00459 FIJPEG_OP_NONE = 0, <span class="comment">// no transformation</span>
<a name="l00460"></a>00460 FIJPEG_OP_FLIP_H = 1, <span class="comment">// horizontal flip</span>
<a name="l00461"></a>00461 FIJPEG_OP_FLIP_V = 2, <span class="comment">// vertical flip</span>
<a name="l00462"></a>00462 FIJPEG_OP_TRANSPOSE = 3, <span class="comment">// transpose across UL-to-LR axis</span>
<a name="l00463"></a>00463 FIJPEG_OP_TRANSVERSE = 4, <span class="comment">// transpose across UR-to-LL axis</span>
<a name="l00464"></a>00464 FIJPEG_OP_ROTATE_90 = 5, <span class="comment">// 90-degree clockwise rotation</span>
<a name="l00465"></a>00465 FIJPEG_OP_ROTATE_180 = 6, <span class="comment">// 180-degree rotation</span>
<a name="l00466"></a>00466 FIJPEG_OP_ROTATE_270 = 7 <span class="comment">// 270-degree clockwise (or 90 ccw)</span>
<a name="l00467"></a>00467 };
<a name="l00468"></a>00468
<a name="l00472"></a>00472 FI_ENUM(FREE_IMAGE_TMO) {
<a name="l00473"></a>00473 FITMO_DRAGO03 = 0, <span class="comment">// Adaptive logarithmic mapping (F. Drago, 2003)</span>
<a name="l00474"></a>00474 FITMO_REINHARD05 = 1, <span class="comment">// Dynamic range reduction inspired by photoreceptor physiology (E. Reinhard, 2005)</span>
<a name="l00475"></a>00475 FITMO_FATTAL02 = 2 <span class="comment">// Gradient domain high dynamic range compression (R. Fattal, 2002)</span>
<a name="l00476"></a>00476 };
<a name="l00477"></a>00477
<a name="l00481"></a>00481 FI_ENUM(FREE_IMAGE_FILTER) {
<a name="l00482"></a>00482 FILTER_BOX = 0, <span class="comment">// Box, pulse, Fourier window, 1st order (constant) b-spline</span>
<a name="l00483"></a>00483 FILTER_BICUBIC = 1, <span class="comment">// Mitchell &amp; Netravali's two-param cubic filter</span>
<a name="l00484"></a>00484 FILTER_BILINEAR = 2, <span class="comment">// Bilinear filter</span>
<a name="l00485"></a>00485 FILTER_BSPLINE = 3, <span class="comment">// 4th order (cubic) b-spline</span>
<a name="l00486"></a>00486 FILTER_CATMULLROM = 4, <span class="comment">// Catmull-Rom spline, Overhauser spline</span>
<a name="l00487"></a>00487 FILTER_LANCZOS3 = 5 <span class="comment">// Lanczos3 filter</span>
<a name="l00488"></a>00488 };
<a name="l00489"></a>00489
<a name="l00493"></a>00493 FI_ENUM(FREE_IMAGE_COLOR_CHANNEL) {
<a name="l00494"></a>00494 FICC_RGB = 0, <span class="comment">// Use red, green and blue channels</span>
<a name="l00495"></a>00495 FICC_RED = 1, <span class="comment">// Use red channel</span>
<a name="l00496"></a>00496 FICC_GREEN = 2, <span class="comment">// Use green channel</span>
<a name="l00497"></a>00497 FICC_BLUE = 3, <span class="comment">// Use blue channel</span>
<a name="l00498"></a>00498 FICC_ALPHA = 4, <span class="comment">// Use alpha channel</span>
<a name="l00499"></a>00499 FICC_BLACK = 5, <span class="comment">// Use black channel</span>
<a name="l00500"></a>00500 FICC_REAL = 6, <span class="comment">// Complex images: use real part</span>
<a name="l00501"></a>00501 FICC_IMAG = 7, <span class="comment">// Complex images: use imaginary part</span>
<a name="l00502"></a>00502 FICC_MAG = 8, <span class="comment">// Complex images: use magnitude</span>
<a name="l00503"></a>00503 FICC_PHASE = 9 <span class="comment">// Complex images: use phase</span>
<a name="l00504"></a>00504 };
<a name="l00505"></a>00505
<a name="l00506"></a>00506 <span class="comment">// Metadata support ---------------------------------------------------------</span>
<a name="l00507"></a>00507
<a name="l00513"></a>00513 FI_ENUM(FREE_IMAGE_MDTYPE) {
<a name="l00514"></a>00514 FIDT_NOTYPE = 0, <span class="comment">// placeholder </span>
<a name="l00515"></a>00515 FIDT_BYTE = 1, <span class="comment">// 8-bit unsigned integer </span>
<a name="l00516"></a>00516 FIDT_ASCII = 2, <span class="comment">// 8-bit bytes w/ last byte null </span>
<a name="l00517"></a>00517 FIDT_SHORT = 3, <span class="comment">// 16-bit unsigned integer </span>
<a name="l00518"></a>00518 FIDT_LONG = 4, <span class="comment">// 32-bit unsigned integer </span>
<a name="l00519"></a>00519 FIDT_RATIONAL = 5, <span class="comment">// 64-bit unsigned fraction </span>
<a name="l00520"></a>00520 FIDT_SBYTE = 6, <span class="comment">// 8-bit signed integer </span>
<a name="l00521"></a>00521 FIDT_UNDEFINED = 7, <span class="comment">// 8-bit untyped data </span>
<a name="l00522"></a>00522 FIDT_SSHORT = 8, <span class="comment">// 16-bit signed integer </span>
<a name="l00523"></a>00523 FIDT_SLONG = 9, <span class="comment">// 32-bit signed integer </span>
<a name="l00524"></a>00524 FIDT_SRATIONAL = 10, <span class="comment">// 64-bit signed fraction </span>
<a name="l00525"></a>00525 FIDT_FLOAT = 11, <span class="comment">// 32-bit IEEE floating point </span>
<a name="l00526"></a>00526 FIDT_DOUBLE = 12, <span class="comment">// 64-bit IEEE floating point </span>
<a name="l00527"></a>00527 FIDT_IFD = 13, <span class="comment">// 32-bit unsigned integer (offset) </span>
<a name="l00528"></a>00528 FIDT_PALETTE = 14 <span class="comment">// 32-bit RGBQUAD </span>
<a name="l00529"></a>00529 };
<a name="l00530"></a>00530
<a name="l00534"></a>00534 FI_ENUM(FREE_IMAGE_MDMODEL) {
<a name="l00535"></a>00535 FIMD_NODATA = -1,
<a name="l00536"></a>00536 FIMD_COMMENTS = 0, <span class="comment">// single comment or keywords</span>
<a name="l00537"></a>00537 FIMD_EXIF_MAIN = 1, <span class="comment">// Exif-TIFF metadata</span>
<a name="l00538"></a>00538 FIMD_EXIF_EXIF = 2, <span class="comment">// Exif-specific metadata</span>
<a name="l00539"></a>00539 FIMD_EXIF_GPS = 3, <span class="comment">// Exif GPS metadata</span>
<a name="l00540"></a>00540 FIMD_EXIF_MAKERNOTE = 4, <span class="comment">// Exif maker note metadata</span>
<a name="l00541"></a>00541 FIMD_EXIF_INTEROP = 5, <span class="comment">// Exif interoperability metadata</span>
<a name="l00542"></a>00542 FIMD_IPTC = 6, <span class="comment">// IPTC/NAA metadata</span>
<a name="l00543"></a>00543 FIMD_XMP = 7, <span class="comment">// Abobe XMP metadata</span>
<a name="l00544"></a>00544 FIMD_GEOTIFF = 8, <span class="comment">// GeoTIFF metadata</span>
<a name="l00545"></a>00545 FIMD_ANIMATION = 9, <span class="comment">// Animation metadata</span>
<a name="l00546"></a>00546 FIMD_CUSTOM = 10, <span class="comment">// Used to attach other metadata types to a dib</span>
<a name="l00547"></a>00547 FIMD_EXIF_RAW = 11 <span class="comment">// Exif metadata as a raw buffer</span>
<a name="l00548"></a>00548 };
<a name="l00549"></a>00549
<a name="l00553"></a>00553 FI_STRUCT (FIMETADATA) { <span class="keywordtype">void</span> *data; };
<a name="l00554"></a>00554
<a name="l00558"></a>00558 FI_STRUCT (FITAG) { <span class="keywordtype">void</span> *data; };
<a name="l00559"></a>00559
<a name="l00560"></a>00560 <span class="comment">// File IO routines ---------------------------------------------------------</span>
<a name="l00561"></a>00561
<a name="l00562"></a>00562 <span class="preprocessor">#ifndef FREEIMAGE_IO</span>
<a name="l00563"></a>00563 <span class="preprocessor"></span><span class="preprocessor">#define FREEIMAGE_IO</span>
<a name="l00564"></a>00564 <span class="preprocessor"></span>
<a name="l00565"></a>00565 <span class="keyword">typedef</span> <span class="keywordtype">void</span>* fi_handle;
<a name="l00566"></a>00566 <span class="keyword">typedef</span> unsigned (DLL_CALLCONV *FI_ReadProc) (<span class="keywordtype">void</span> *buffer, <span class="keywordtype">unsigned</span> size, <span class="keywordtype">unsigned</span> count, fi_handle handle);
<a name="l00567"></a>00567 <span class="keyword">typedef</span> unsigned (DLL_CALLCONV *FI_WriteProc) (<span class="keywordtype">void</span> *buffer, <span class="keywordtype">unsigned</span> size, <span class="keywordtype">unsigned</span> count, fi_handle handle);
<a name="l00568"></a>00568 <span class="keyword">typedef</span> int (DLL_CALLCONV *FI_SeekProc) (fi_handle handle, <span class="keywordtype">long</span> offset, <span class="keywordtype">int</span> origin);
<a name="l00569"></a>00569 <span class="keyword">typedef</span> long (DLL_CALLCONV *FI_TellProc) (fi_handle handle);
<a name="l00570"></a>00570
<a name="l00571"></a>00571 <span class="preprocessor">#if (defined(_WIN32) || defined(__WIN32__))</span>
<a name="l00572"></a>00572 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(push, 1)</span>
<a name="l00573"></a>00573 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00574"></a>00574 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(1)</span>
<a name="l00575"></a>00575 <span class="preprocessor"></span><span class="preprocessor">#endif // WIN32</span>
<a name="l00576"></a>00576 <span class="preprocessor"></span>
<a name="l00577"></a>00577 FI_STRUCT(FreeImageIO) {
<a name="l00578"></a>00578 FI_ReadProc read_proc; <span class="comment">// pointer to the function used to read data</span>
<a name="l00579"></a>00579 FI_WriteProc write_proc; <span class="comment">// pointer to the function used to write data</span>
<a name="l00580"></a>00580 FI_SeekProc seek_proc; <span class="comment">// pointer to the function used to seek</span>
<a name="l00581"></a>00581 FI_TellProc tell_proc; <span class="comment">// pointer to the function used to aquire the current position</span>
<a name="l00582"></a>00582 };
<a name="l00583"></a>00583
<a name="l00584"></a>00584 <span class="preprocessor">#if (defined(_WIN32) || defined(__WIN32__))</span>
<a name="l00585"></a>00585 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(pop)</span>
<a name="l00586"></a>00586 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00587"></a>00587 <span class="preprocessor"></span><span class="preprocessor">#pragma pack()</span>
<a name="l00588"></a>00588 <span class="preprocessor"></span><span class="preprocessor">#endif // WIN32</span>
<a name="l00589"></a>00589 <span class="preprocessor"></span>
<a name="l00593"></a>00593 FI_STRUCT (FIMEMORY) { <span class="keywordtype">void</span> *data; };
<a name="l00594"></a>00594
<a name="l00595"></a>00595 <span class="preprocessor">#endif // FREEIMAGE_IO</span>
<a name="l00596"></a>00596 <span class="preprocessor"></span>
<a name="l00597"></a>00597 <span class="comment">// Plugin routines ----------------------------------------------------------</span>
<a name="l00598"></a>00598
<a name="l00599"></a>00599 <span class="preprocessor">#ifndef PLUGINS</span>
<a name="l00600"></a>00600 <span class="preprocessor"></span><span class="preprocessor">#define PLUGINS</span>
<a name="l00601"></a>00601 <span class="preprocessor"></span>
<a name="l00602"></a>00602 <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *(DLL_CALLCONV *FI_FormatProc)(<span class="keywordtype">void</span>);
<a name="l00603"></a>00603 <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *(DLL_CALLCONV *FI_DescriptionProc)(<span class="keywordtype">void</span>);
<a name="l00604"></a>00604 <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *(DLL_CALLCONV *FI_ExtensionListProc)(<span class="keywordtype">void</span>);
<a name="l00605"></a>00605 <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *(DLL_CALLCONV *FI_RegExprProc)(<span class="keywordtype">void</span>);
<a name="l00606"></a>00606 <span class="keyword">typedef</span> <span class="keywordtype">void</span> *(DLL_CALLCONV *FI_OpenProc)(FreeImageIO *io, fi_handle handle, BOOL read);
<a name="l00607"></a>00607 <span class="keyword">typedef</span> void (DLL_CALLCONV *FI_CloseProc)(FreeImageIO *io, fi_handle handle, <span class="keywordtype">void</span> *data);
<a name="l00608"></a>00608 <span class="keyword">typedef</span> int (DLL_CALLCONV *FI_PageCountProc)(FreeImageIO *io, fi_handle handle, <span class="keywordtype">void</span> *data);
<a name="l00609"></a>00609 <span class="keyword">typedef</span> int (DLL_CALLCONV *FI_PageCapabilityProc)(FreeImageIO *io, fi_handle handle, <span class="keywordtype">void</span> *data);
<a name="l00610"></a>00610 <span class="keyword">typedef</span> FIBITMAP *(DLL_CALLCONV *FI_LoadProc)(FreeImageIO *io, fi_handle handle, <span class="keywordtype">int</span> page, <span class="keywordtype">int</span> flags, <span class="keywordtype">void</span> *data);
<a name="l00611"></a>00611 <span class="keyword">typedef</span> BOOL (DLL_CALLCONV *FI_SaveProc)(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, <span class="keywordtype">int</span> page, <span class="keywordtype">int</span> flags, <span class="keywordtype">void</span> *data);
<a name="l00612"></a>00612 <span class="keyword">typedef</span> BOOL (DLL_CALLCONV *FI_ValidateProc)(FreeImageIO *io, fi_handle handle);
<a name="l00613"></a>00613 <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *(DLL_CALLCONV *FI_MimeProc)(<span class="keywordtype">void</span>);
<a name="l00614"></a>00614 <span class="keyword">typedef</span> BOOL (DLL_CALLCONV *FI_SupportsExportBPPProc)(<span class="keywordtype">int</span> bpp);
<a name="l00615"></a>00615 <span class="keyword">typedef</span> BOOL (DLL_CALLCONV *FI_SupportsExportTypeProc)(FREE_IMAGE_TYPE type);
<a name="l00616"></a>00616 <span class="keyword">typedef</span> BOOL (DLL_CALLCONV *FI_SupportsICCProfilesProc)(void);
<a name="l00617"></a>00617 <span class="keyword">typedef</span> BOOL (DLL_CALLCONV *FI_SupportsNoPixelsProc)(void);
<a name="l00618"></a>00618
<a name="l00619"></a>00619 FI_STRUCT (Plugin) {
<a name="l00620"></a>00620 FI_FormatProc format_proc;
<a name="l00621"></a>00621 FI_DescriptionProc description_proc;
<a name="l00622"></a>00622 FI_ExtensionListProc extension_proc;
<a name="l00623"></a>00623 FI_RegExprProc regexpr_proc;
<a name="l00624"></a>00624 FI_OpenProc open_proc;
<a name="l00625"></a>00625 FI_CloseProc close_proc;
<a name="l00626"></a>00626 FI_PageCountProc pagecount_proc;
<a name="l00627"></a>00627 FI_PageCapabilityProc pagecapability_proc;
<a name="l00628"></a>00628 FI_LoadProc load_proc;
<a name="l00629"></a>00629 FI_SaveProc save_proc;
<a name="l00630"></a>00630 FI_ValidateProc validate_proc;
<a name="l00631"></a>00631 FI_MimeProc mime_proc;
<a name="l00632"></a>00632 FI_SupportsExportBPPProc supports_export_bpp_proc;
<a name="l00633"></a>00633 FI_SupportsExportTypeProc supports_export_type_proc;
<a name="l00634"></a>00634 FI_SupportsICCProfilesProc supports_icc_profiles_proc;
<a name="l00635"></a>00635 FI_SupportsNoPixelsProc supports_no_pixels_proc;
<a name="l00636"></a>00636 };
<a name="l00637"></a>00637
<a name="l00638"></a>00638 <span class="keyword">typedef</span> void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, <span class="keywordtype">int</span> format_id);
<a name="l00639"></a>00639
<a name="l00640"></a>00640 <span class="preprocessor">#endif // PLUGINS</span>
<a name="l00641"></a>00641 <span class="preprocessor"></span>
<a name="l00642"></a>00642
<a name="l00643"></a>00643 <span class="comment">// Load / Save flag constants -----------------------------------------------</span>
<a name="l00644"></a>00644
<a name="l00645"></a>00645 <span class="preprocessor">#define FIF_LOAD_NOPIXELS 0x8000 // loading: load the image header only (not supported by all plugins)</span>
<a name="l00646"></a>00646 <span class="preprocessor"></span>
<a name="l00647"></a>00647 <span class="preprocessor">#define BMP_DEFAULT 0</span>
<a name="l00648"></a>00648 <span class="preprocessor"></span><span class="preprocessor">#define BMP_SAVE_RLE 1</span>
<a name="l00649"></a>00649 <span class="preprocessor"></span><span class="preprocessor">#define CUT_DEFAULT 0</span>
<a name="l00650"></a>00650 <span class="preprocessor"></span><span class="preprocessor">#define DDS_DEFAULT 0</span>
<a name="l00651"></a>00651 <span class="preprocessor"></span><span class="preprocessor">#define EXR_DEFAULT 0 // save data as half with piz-based wavelet compression</span>
<a name="l00652"></a>00652 <span class="preprocessor"></span><span class="preprocessor">#define EXR_FLOAT 0x0001 // save data as float instead of as half (not recommended)</span>
<a name="l00653"></a>00653 <span class="preprocessor"></span><span class="preprocessor">#define EXR_NONE 0x0002 // save with no compression</span>
<a name="l00654"></a>00654 <span class="preprocessor"></span><span class="preprocessor">#define EXR_ZIP 0x0004 // save with zlib compression, in blocks of 16 scan lines</span>
<a name="l00655"></a>00655 <span class="preprocessor"></span><span class="preprocessor">#define EXR_PIZ 0x0008 // save with piz-based wavelet compression</span>
<a name="l00656"></a>00656 <span class="preprocessor"></span><span class="preprocessor">#define EXR_PXR24 0x0010 // save with lossy 24-bit float compression</span>
<a name="l00657"></a>00657 <span class="preprocessor"></span><span class="preprocessor">#define EXR_B44 0x0020 // save with lossy 44% float compression - goes to 22% when combined with EXR_LC</span>
<a name="l00658"></a>00658 <span class="preprocessor"></span><span class="preprocessor">#define EXR_LC 0x0040 // save images with one luminance and two chroma channels, rather than as RGB (lossy compression)</span>
<a name="l00659"></a>00659 <span class="preprocessor"></span><span class="preprocessor">#define FAXG3_DEFAULT 0</span>
<a name="l00660"></a>00660 <span class="preprocessor"></span><span class="preprocessor">#define GIF_DEFAULT 0</span>
<a name="l00661"></a>00661 <span class="preprocessor"></span><span class="preprocessor">#define GIF_LOAD256 1 // Load the image as a 256 color image with ununsed palette entries, if it's 16 or 2 color</span>
<a name="l00662"></a>00662 <span class="preprocessor"></span><span class="preprocessor">#define GIF_PLAYBACK 2 // 'Play' the GIF to generate each frame (as 32bpp) instead of returning raw frame data when loading</span>
<a name="l00663"></a>00663 <span class="preprocessor"></span><span class="preprocessor">#define HDR_DEFAULT 0</span>
<a name="l00664"></a>00664 <span class="preprocessor"></span><span class="preprocessor">#define ICO_DEFAULT 0</span>
<a name="l00665"></a>00665 <span class="preprocessor"></span><span class="preprocessor">#define ICO_MAKEALPHA 1 // convert to 32bpp and create an alpha channel from the AND-mask when loading</span>
<a name="l00666"></a>00666 <span class="preprocessor"></span><span class="preprocessor">#define IFF_DEFAULT 0</span>
<a name="l00667"></a>00667 <span class="preprocessor"></span><span class="preprocessor">#define J2K_DEFAULT 0 // save with a 16:1 rate</span>
<a name="l00668"></a>00668 <span class="preprocessor"></span><span class="preprocessor">#define JP2_DEFAULT 0 // save with a 16:1 rate</span>
<a name="l00669"></a>00669 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_DEFAULT 0 // loading (see JPEG_FAST); saving (see JPEG_QUALITYGOOD|JPEG_SUBSAMPLING_420)</span>
<a name="l00670"></a>00670 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_FAST 0x0001 // load the file as fast as possible, sacrificing some quality</span>
<a name="l00671"></a>00671 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_ACCURATE 0x0002 // load the file with the best quality, sacrificing some speed</span>
<a name="l00672"></a>00672 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_CMYK 0x0004 // load separated CMYK "as is" (use | to combine with other load flags)</span>
<a name="l00673"></a>00673 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_EXIFROTATE 0x0008 // load and rotate according to Exif 'Orientation' tag if available</span>
<a name="l00674"></a>00674 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_QUALITYSUPERB 0x80 // save with superb quality (100:1)</span>
<a name="l00675"></a>00675 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_QUALITYGOOD 0x0100 // save with good quality (75:1)</span>
<a name="l00676"></a>00676 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_QUALITYNORMAL 0x0200 // save with normal quality (50:1)</span>
<a name="l00677"></a>00677 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_QUALITYAVERAGE 0x0400 // save with average quality (25:1)</span>
<a name="l00678"></a>00678 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_QUALITYBAD 0x0800 // save with bad quality (10:1)</span>
<a name="l00679"></a>00679 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_PROGRESSIVE 0x2000 // save as a progressive-JPEG (use | to combine with other save flags)</span>
<a name="l00680"></a>00680 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_SUBSAMPLING_411 0x1000 // save with high 4x1 chroma subsampling (4:1:1) </span>
<a name="l00681"></a>00681 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_SUBSAMPLING_420 0x4000 // save with medium 2x2 medium chroma subsampling (4:2:0) - default value</span>
<a name="l00682"></a>00682 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_SUBSAMPLING_422 0x8000 // save with low 2x1 chroma subsampling (4:2:2) </span>
<a name="l00683"></a>00683 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_SUBSAMPLING_444 0x10000 // save with no chroma subsampling (4:4:4)</span>
<a name="l00684"></a>00684 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_OPTIMIZE 0x20000 // on saving, compute optimal Huffman coding tables (can reduce a few percent of file size)</span>
<a name="l00685"></a>00685 <span class="preprocessor"></span><span class="preprocessor">#define KOALA_DEFAULT 0</span>
<a name="l00686"></a>00686 <span class="preprocessor"></span><span class="preprocessor">#define LBM_DEFAULT 0</span>
<a name="l00687"></a>00687 <span class="preprocessor"></span><span class="preprocessor">#define MNG_DEFAULT 0</span>
<a name="l00688"></a>00688 <span class="preprocessor"></span><span class="preprocessor">#define PCD_DEFAULT 0</span>
<a name="l00689"></a>00689 <span class="preprocessor"></span><span class="preprocessor">#define PCD_BASE 1 // load the bitmap sized 768 x 512</span>
<a name="l00690"></a>00690 <span class="preprocessor"></span><span class="preprocessor">#define PCD_BASEDIV4 2 // load the bitmap sized 384 x 256</span>
<a name="l00691"></a>00691 <span class="preprocessor"></span><span class="preprocessor">#define PCD_BASEDIV16 3 // load the bitmap sized 192 x 128</span>
<a name="l00692"></a>00692 <span class="preprocessor"></span><span class="preprocessor">#define PCX_DEFAULT 0</span>
<a name="l00693"></a>00693 <span class="preprocessor"></span><span class="preprocessor">#define PFM_DEFAULT 0</span>
<a name="l00694"></a>00694 <span class="preprocessor"></span><span class="preprocessor">#define PICT_DEFAULT 0</span>
<a name="l00695"></a>00695 <span class="preprocessor"></span><span class="preprocessor">#define PNG_DEFAULT 0</span>
<a name="l00696"></a>00696 <span class="preprocessor"></span><span class="preprocessor">#define PNG_IGNOREGAMMA 1 // loading: avoid gamma correction</span>
<a name="l00697"></a>00697 <span class="preprocessor"></span><span class="preprocessor">#define PNG_Z_BEST_SPEED 0x0001 // save using ZLib level 1 compression flag (default value is 6)</span>
<a name="l00698"></a>00698 <span class="preprocessor"></span><span class="preprocessor">#define PNG_Z_DEFAULT_COMPRESSION 0x0006 // save using ZLib level 6 compression flag (default recommended value)</span>
<a name="l00699"></a>00699 <span class="preprocessor"></span><span class="preprocessor">#define PNG_Z_BEST_COMPRESSION 0x0009 // save using ZLib level 9 compression flag (default value is 6)</span>
<a name="l00700"></a>00700 <span class="preprocessor"></span><span class="preprocessor">#define PNG_Z_NO_COMPRESSION 0x0100 // save without ZLib compression</span>
<a name="l00701"></a>00701 <span class="preprocessor"></span><span class="preprocessor">#define PNG_INTERLACED 0x0200 // save using Adam7 interlacing (use | to combine with other save flags)</span>
<a name="l00702"></a>00702 <span class="preprocessor"></span><span class="preprocessor">#define PNM_DEFAULT 0</span>
<a name="l00703"></a>00703 <span class="preprocessor"></span><span class="preprocessor">#define PNM_SAVE_RAW 0 // If set the writer saves in RAW format (i.e. P4, P5 or P6)</span>
<a name="l00704"></a>00704 <span class="preprocessor"></span><span class="preprocessor">#define PNM_SAVE_ASCII 1 // If set the writer saves in ASCII format (i.e. P1, P2 or P3)</span>
<a name="l00705"></a>00705 <span class="preprocessor"></span><span class="preprocessor">#define PSD_DEFAULT 0</span>
<a name="l00706"></a>00706 <span class="preprocessor"></span><span class="preprocessor">#define PSD_CMYK 1 // reads tags for separated CMYK (default is conversion to RGB)</span>
<a name="l00707"></a>00707 <span class="preprocessor"></span><span class="preprocessor">#define PSD_LAB 2 // reads tags for CIELab (default is conversion to RGB)</span>
<a name="l00708"></a>00708 <span class="preprocessor"></span><span class="preprocessor">#define RAS_DEFAULT 0</span>
<a name="l00709"></a>00709 <span class="preprocessor"></span><span class="preprocessor">#define RAW_DEFAULT 0 // load the file as linear RGB 48-bit</span>
<a name="l00710"></a>00710 <span class="preprocessor"></span><span class="preprocessor">#define RAW_PREVIEW 1 // try to load the embedded JPEG preview with included Exif Data or default to RGB 24-bit</span>
<a name="l00711"></a>00711 <span class="preprocessor"></span><span class="preprocessor">#define RAW_DISPLAY 2 // load the file as RGB 24-bit</span>
<a name="l00712"></a>00712 <span class="preprocessor"></span><span class="preprocessor">#define SGI_DEFAULT 0</span>
<a name="l00713"></a>00713 <span class="preprocessor"></span><span class="preprocessor">#define TARGA_DEFAULT 0</span>
<a name="l00714"></a>00714 <span class="preprocessor"></span><span class="preprocessor">#define TARGA_LOAD_RGB888 1 // If set the loader converts RGB555 and ARGB8888 -&gt; RGB888.</span>
<a name="l00715"></a>00715 <span class="preprocessor"></span><span class="preprocessor">#define TARGA_SAVE_RLE 2 // If set, the writer saves with RLE compression</span>
<a name="l00716"></a>00716 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_DEFAULT 0</span>
<a name="l00717"></a>00717 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_CMYK 0x0001 // reads/stores tags for separated CMYK (use | to combine with compression flags)</span>
<a name="l00718"></a>00718 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_PACKBITS 0x0100 // save using PACKBITS compression</span>
<a name="l00719"></a>00719 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_DEFLATE 0x0200 // save using DEFLATE compression (a.k.a. ZLIB compression)</span>
<a name="l00720"></a>00720 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_ADOBE_DEFLATE 0x0400 // save using ADOBE DEFLATE compression</span>
<a name="l00721"></a>00721 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_NONE 0x0800 // save without any compression</span>
<a name="l00722"></a>00722 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_CCITTFAX3 0x1000 // save using CCITT Group 3 fax encoding</span>
<a name="l00723"></a>00723 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_CCITTFAX4 0x2000 // save using CCITT Group 4 fax encoding</span>
<a name="l00724"></a>00724 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_LZW 0x4000 // save using LZW compression</span>
<a name="l00725"></a>00725 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_JPEG 0x8000 // save using JPEG compression</span>
<a name="l00726"></a>00726 <span class="preprocessor"></span><span class="preprocessor">#define TIFF_LOGLUV 0x10000 // save using LogLuv compression</span>
<a name="l00727"></a>00727 <span class="preprocessor"></span><span class="preprocessor">#define WBMP_DEFAULT 0</span>
<a name="l00728"></a>00728 <span class="preprocessor"></span><span class="preprocessor">#define XBM_DEFAULT 0</span>
<a name="l00729"></a>00729 <span class="preprocessor"></span><span class="preprocessor">#define XPM_DEFAULT 0</span>
<a name="l00730"></a>00730 <span class="preprocessor"></span>
<a name="l00731"></a>00731 <span class="comment">// Background filling options ---------------------------------------------------------</span>
<a name="l00732"></a>00732 <span class="comment">// Constants used in FreeImage_FillBackground and FreeImage_EnlargeCanvas</span>
<a name="l00733"></a>00733
<a name="l00734"></a>00734 <span class="preprocessor">#define FI_COLOR_IS_RGB_COLOR 0x00 // RGBQUAD color is a RGB color (contains no valid alpha channel)</span>
<a name="l00735"></a>00735 <span class="preprocessor"></span><span class="preprocessor">#define FI_COLOR_IS_RGBA_COLOR 0x01 // RGBQUAD color is a RGBA color (contains a valid alpha channel)</span>
<a name="l00736"></a>00736 <span class="preprocessor"></span><span class="preprocessor">#define FI_COLOR_FIND_EQUAL_COLOR 0x02 // For palettized images: lookup equal RGB color from palette</span>
<a name="l00737"></a>00737 <span class="preprocessor"></span><span class="preprocessor">#define FI_COLOR_ALPHA_IS_INDEX 0x04 // The color's rgbReserved member (alpha) contains the palette index to be used</span>
<a name="l00738"></a>00738 <span class="preprocessor"></span><span class="preprocessor">#define FI_COLOR_PALETTE_SEARCH_MASK (FI_COLOR_FIND_EQUAL_COLOR | FI_COLOR_ALPHA_IS_INDEX) // No color lookup is performed</span>
<a name="l00739"></a>00739 <span class="preprocessor"></span>
<a name="l00740"></a>00740
<a name="l00741"></a>00741 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00742"></a>00742 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00743"></a>00743 <span class="preprocessor">#endif</span>
<a name="l00744"></a>00744 <span class="preprocessor"></span>
<a name="l00745"></a>00745 <span class="comment">// Init / Error routines ----------------------------------------------------</span>
<a name="l00746"></a>00746
<a name="l00747"></a>00747 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_Initialise(BOOL load_local_plugins_only FI_DEFAULT(FALSE));
<a name="l00748"></a>00748 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_DeInitialise(<span class="keywordtype">void</span>);
<a name="l00749"></a>00749
<a name="l00750"></a>00750 <span class="comment">// Version routines ---------------------------------------------------------</span>
<a name="l00751"></a>00751
<a name="l00752"></a>00752 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span> *DLL_CALLCONV FreeImage_GetVersion(<span class="keywordtype">void</span>);
<a name="l00753"></a>00753 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span> *DLL_CALLCONV FreeImage_GetCopyrightMessage(<span class="keywordtype">void</span>);
<a name="l00754"></a>00754
<a name="l00755"></a>00755 <span class="comment">// Message output functions -------------------------------------------------</span>
<a name="l00756"></a>00756
<a name="l00757"></a>00757 <span class="keyword">typedef</span> void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, <span class="keyword">const</span> <span class="keywordtype">char</span> *msg);
<a name="l00758"></a>00758 <span class="keyword">typedef</span> void (DLL_CALLCONV *FreeImage_OutputMessageFunctionStdCall)(FREE_IMAGE_FORMAT fif, <span class="keyword">const</span> <span class="keywordtype">char</span> *msg);
<a name="l00759"></a>00759
<a name="l00760"></a>00760 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_SetOutputMessageStdCall(FreeImage_OutputMessageFunctionStdCall omf);
<a name="l00761"></a>00761 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_SetOutputMessage(FreeImage_OutputMessageFunction omf);
<a name="l00762"></a>00762 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_OutputMessageProc(<span class="keywordtype">int</span> fif, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...);
<a name="l00763"></a>00763
<a name="l00764"></a>00764 <span class="comment">// Allocate / Clone / Unload routines ---------------------------------------</span>
<a name="l00765"></a>00765
<a name="l00766"></a>00766 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Allocate(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> bpp, <span class="keywordtype">unsigned</span> red_mask FI_DEFAULT(0), <span class="keywordtype">unsigned</span> green_mask FI_DEFAULT(0), <span class="keywordtype">unsigned</span> blue_mask FI_DEFAULT(0));
<a name="l00767"></a>00767 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateT(FREE_IMAGE_TYPE type, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> bpp FI_DEFAULT(8), <span class="keywordtype">unsigned</span> red_mask FI_DEFAULT(0), <span class="keywordtype">unsigned</span> green_mask FI_DEFAULT(0), <span class="keywordtype">unsigned</span> blue_mask FI_DEFAULT(0));
<a name="l00768"></a>00768 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_Clone(FIBITMAP *dib);
<a name="l00769"></a>00769 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_Unload(FIBITMAP *dib);
<a name="l00770"></a>00770
<a name="l00771"></a>00771 <span class="comment">// Header loading routines</span>
<a name="l00772"></a>00772 DLL_API BOOL DLL_CALLCONV FreeImage_HasPixels(FIBITMAP *dib);
<a name="l00773"></a>00773
<a name="l00774"></a>00774 <span class="comment">// Load / Save routines -----------------------------------------------------</span>
<a name="l00775"></a>00775
<a name="l00776"></a>00776 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Load(FREE_IMAGE_FORMAT fif, <span class="keyword">const</span> <span class="keywordtype">char</span> *filename, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00777"></a>00777 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadU(FREE_IMAGE_FORMAT fif, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *filename, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00778"></a>00778 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00779"></a>00779 DLL_API BOOL DLL_CALLCONV FreeImage_Save(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, <span class="keyword">const</span> <span class="keywordtype">char</span> *filename, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00780"></a>00780 DLL_API BOOL DLL_CALLCONV FreeImage_SaveU(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *filename, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00781"></a>00781 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToHandle(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00782"></a>00782
<a name="l00783"></a>00783 <span class="comment">// Memory I/O stream routines -----------------------------------------------</span>
<a name="l00784"></a>00784
<a name="l00785"></a>00785 DLL_API FIMEMORY *DLL_CALLCONV FreeImage_OpenMemory(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
<a name="l00786"></a>00786 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_CloseMemory(FIMEMORY *stream);
<a name="l00787"></a>00787 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_LoadFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00788"></a>00788 DLL_API BOOL DLL_CALLCONV FreeImage_SaveToMemory(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00789"></a>00789 DLL_API <span class="keywordtype">long</span> DLL_CALLCONV FreeImage_TellMemory(FIMEMORY *stream);
<a name="l00790"></a>00790 DLL_API BOOL DLL_CALLCONV FreeImage_SeekMemory(FIMEMORY *stream, <span class="keywordtype">long</span> offset, <span class="keywordtype">int</span> origin);
<a name="l00791"></a>00791 DLL_API BOOL DLL_CALLCONV FreeImage_AcquireMemory(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
<a name="l00792"></a>00792 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_ReadMemory(<span class="keywordtype">void</span> *buffer, <span class="keywordtype">unsigned</span> size, <span class="keywordtype">unsigned</span> count, FIMEMORY *stream);
<a name="l00793"></a>00793 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_WriteMemory(<span class="keyword">const</span> <span class="keywordtype">void</span> *buffer, <span class="keywordtype">unsigned</span> size, <span class="keywordtype">unsigned</span> count, FIMEMORY *stream);
<a name="l00794"></a>00794
<a name="l00795"></a>00795 DLL_API FIMULTIBITMAP *DLL_CALLCONV FreeImage_LoadMultiBitmapFromMemory(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00796"></a>00796 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToMemory(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FIMEMORY *stream, <span class="keywordtype">int</span> flags);
<a name="l00797"></a>00797
<a name="l00798"></a>00798 <span class="comment">// Plugin Interface ---------------------------------------------------------</span>
<a name="l00799"></a>00799
<a name="l00800"></a>00800 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterLocalPlugin(FI_InitProc proc_address, <span class="keyword">const</span> <span class="keywordtype">char</span> *format FI_DEFAULT(0), <span class="keyword">const</span> <span class="keywordtype">char</span> *description FI_DEFAULT(0), <span class="keyword">const</span> <span class="keywordtype">char</span> *extension FI_DEFAULT(0), <span class="keyword">const</span> <span class="keywordtype">char</span> *regexpr FI_DEFAULT(0));
<a name="l00801"></a>00801 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_RegisterExternalPlugin(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <span class="keyword">const</span> <span class="keywordtype">char</span> *format FI_DEFAULT(0), <span class="keyword">const</span> <span class="keywordtype">char</span> *description FI_DEFAULT(0), <span class="keyword">const</span> <span class="keywordtype">char</span> *extension FI_DEFAULT(0), <span class="keyword">const</span> <span class="keywordtype">char</span> *regexpr FI_DEFAULT(0));
<a name="l00802"></a>00802 DLL_API <span class="keywordtype">int</span> DLL_CALLCONV FreeImage_GetFIFCount(<span class="keywordtype">void</span>);
<a name="l00803"></a>00803 DLL_API <span class="keywordtype">int</span> DLL_CALLCONV FreeImage_SetPluginEnabled(FREE_IMAGE_FORMAT fif, BOOL enable);
<a name="l00804"></a>00804 DLL_API <span class="keywordtype">int</span> DLL_CALLCONV FreeImage_IsPluginEnabled(FREE_IMAGE_FORMAT fif);
<a name="l00805"></a>00805 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFormat(<span class="keyword">const</span> <span class="keywordtype">char</span> *format);
<a name="l00806"></a>00806 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromMime(<span class="keyword">const</span> <span class="keywordtype">char</span> *mime);
<a name="l00807"></a>00807 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span> *DLL_CALLCONV FreeImage_GetFormatFromFIF(FREE_IMAGE_FORMAT fif);
<a name="l00808"></a>00808 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span> *DLL_CALLCONV FreeImage_GetFIFExtensionList(FREE_IMAGE_FORMAT fif);
<a name="l00809"></a>00809 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span> *DLL_CALLCONV FreeImage_GetFIFDescription(FREE_IMAGE_FORMAT fif);
<a name="l00810"></a>00810 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span> *DLL_CALLCONV FreeImage_GetFIFRegExpr(FREE_IMAGE_FORMAT fif);
<a name="l00811"></a>00811 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span> *DLL_CALLCONV FreeImage_GetFIFMimeType(FREE_IMAGE_FORMAT fif);
<a name="l00812"></a>00812 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilename(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename);
<a name="l00813"></a>00813 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFIFFromFilenameU(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *filename);
<a name="l00814"></a>00814 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif);
<a name="l00815"></a>00815 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsWriting(FREE_IMAGE_FORMAT fif);
<a name="l00816"></a>00816 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportBPP(FREE_IMAGE_FORMAT fif, <span class="keywordtype">int</span> bpp);
<a name="l00817"></a>00817 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsExportType(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
<a name="l00818"></a>00818 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsICCProfiles(FREE_IMAGE_FORMAT fif);
<a name="l00819"></a>00819 DLL_API BOOL DLL_CALLCONV FreeImage_FIFSupportsNoPixels(FREE_IMAGE_FORMAT fif);
<a name="l00820"></a>00820
<a name="l00821"></a>00821 <span class="comment">// Multipaging interface ----------------------------------------------------</span>
<a name="l00822"></a>00822
<a name="l00823"></a>00823 DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmap(FREE_IMAGE_FORMAT fif, <span class="keyword">const</span> <span class="keywordtype">char</span> *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00824"></a>00824 DLL_API FIMULTIBITMAP * DLL_CALLCONV FreeImage_OpenMultiBitmapFromHandle(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00825"></a>00825 DLL_API BOOL DLL_CALLCONV FreeImage_SaveMultiBitmapToHandle(FREE_IMAGE_FORMAT fif, FIMULTIBITMAP *bitmap, FreeImageIO *io, fi_handle handle, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00826"></a>00826 DLL_API BOOL DLL_CALLCONV FreeImage_CloseMultiBitmap(FIMULTIBITMAP *bitmap, <span class="keywordtype">int</span> flags FI_DEFAULT(0));
<a name="l00827"></a>00827 DLL_API <span class="keywordtype">int</span> DLL_CALLCONV FreeImage_GetPageCount(FIMULTIBITMAP *bitmap);
<a name="l00828"></a>00828 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_AppendPage(FIMULTIBITMAP *bitmap, FIBITMAP *data);
<a name="l00829"></a>00829 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_InsertPage(FIMULTIBITMAP *bitmap, <span class="keywordtype">int</span> page, FIBITMAP *data);
<a name="l00830"></a>00830 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_DeletePage(FIMULTIBITMAP *bitmap, <span class="keywordtype">int</span> page);
<a name="l00831"></a>00831 DLL_API FIBITMAP * DLL_CALLCONV FreeImage_LockPage(FIMULTIBITMAP *bitmap, <span class="keywordtype">int</span> page);
<a name="l00832"></a>00832 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_UnlockPage(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
<a name="l00833"></a>00833 DLL_API BOOL DLL_CALLCONV FreeImage_MovePage(FIMULTIBITMAP *bitmap, <span class="keywordtype">int</span> target, <span class="keywordtype">int</span> source);
<a name="l00834"></a>00834 DLL_API BOOL DLL_CALLCONV FreeImage_GetLockedPageNumbers(FIMULTIBITMAP *bitmap, <span class="keywordtype">int</span> *pages, <span class="keywordtype">int</span> *count);
<a name="l00835"></a>00835
<a name="l00836"></a>00836 <span class="comment">// Filetype request routines ------------------------------------------------</span>
<a name="l00837"></a>00837
<a name="l00838"></a>00838 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileType(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename, <span class="keywordtype">int</span> size FI_DEFAULT(0));
<a name="l00839"></a>00839 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeU(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *filename, <span class="keywordtype">int</span> size FI_DEFAULT(0));
<a name="l00840"></a>00840 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromHandle(FreeImageIO *io, fi_handle handle, <span class="keywordtype">int</span> size FI_DEFAULT(0));
<a name="l00841"></a>00841 DLL_API FREE_IMAGE_FORMAT DLL_CALLCONV FreeImage_GetFileTypeFromMemory(FIMEMORY *stream, <span class="keywordtype">int</span> size FI_DEFAULT(0));
<a name="l00842"></a>00842
<a name="l00843"></a>00843 <span class="comment">// Image type request routine -----------------------------------------------</span>
<a name="l00844"></a>00844
<a name="l00845"></a>00845 DLL_API FREE_IMAGE_TYPE DLL_CALLCONV FreeImage_GetImageType(FIBITMAP *dib);
<a name="l00846"></a>00846
<a name="l00847"></a>00847 <span class="comment">// FreeImage helper routines ------------------------------------------------</span>
<a name="l00848"></a>00848
<a name="l00849"></a>00849 DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(<span class="keywordtype">void</span>);
<a name="l00850"></a>00850 DLL_API BOOL DLL_CALLCONV FreeImage_LookupX11Color(<span class="keyword">const</span> <span class="keywordtype">char</span> *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
<a name="l00851"></a>00851 DLL_API BOOL DLL_CALLCONV FreeImage_LookupSVGColor(<span class="keyword">const</span> <span class="keywordtype">char</span> *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
<a name="l00852"></a>00852
<a name="l00853"></a>00853 <span class="comment">// Pixel access routines ----------------------------------------------------</span>
<a name="l00854"></a>00854
<a name="l00855"></a>00855 DLL_API BYTE *DLL_CALLCONV FreeImage_GetBits(FIBITMAP *dib);
<a name="l00856"></a>00856 DLL_API BYTE *DLL_CALLCONV FreeImage_GetScanLine(FIBITMAP *dib, <span class="keywordtype">int</span> scanline);
<a name="l00857"></a>00857
<a name="l00858"></a>00858 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelIndex(FIBITMAP *dib, <span class="keywordtype">unsigned</span> x, <span class="keywordtype">unsigned</span> y, BYTE *value);
<a name="l00859"></a>00859 DLL_API BOOL DLL_CALLCONV FreeImage_GetPixelColor(FIBITMAP *dib, <span class="keywordtype">unsigned</span> x, <span class="keywordtype">unsigned</span> y, RGBQUAD *value);
<a name="l00860"></a>00860 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelIndex(FIBITMAP *dib, <span class="keywordtype">unsigned</span> x, <span class="keywordtype">unsigned</span> y, BYTE *value);
<a name="l00861"></a>00861 DLL_API BOOL DLL_CALLCONV FreeImage_SetPixelColor(FIBITMAP *dib, <span class="keywordtype">unsigned</span> x, <span class="keywordtype">unsigned</span> y, RGBQUAD *value);
<a name="l00862"></a>00862
<a name="l00863"></a>00863 <span class="comment">// DIB info routines --------------------------------------------------------</span>
<a name="l00864"></a>00864
<a name="l00865"></a>00865 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetColorsUsed(FIBITMAP *dib);
<a name="l00866"></a>00866 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetBPP(FIBITMAP *dib);
<a name="l00867"></a>00867 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetWidth(FIBITMAP *dib);
<a name="l00868"></a>00868 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetHeight(FIBITMAP *dib);
<a name="l00869"></a>00869 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetLine(FIBITMAP *dib);
<a name="l00870"></a>00870 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetPitch(FIBITMAP *dib);
<a name="l00871"></a>00871 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetDIBSize(FIBITMAP *dib);
<a name="l00872"></a>00872 DLL_API RGBQUAD *DLL_CALLCONV FreeImage_GetPalette(FIBITMAP *dib);
<a name="l00873"></a>00873
<a name="l00874"></a>00874 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetDotsPerMeterX(FIBITMAP *dib);
<a name="l00875"></a>00875 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetDotsPerMeterY(FIBITMAP *dib);
<a name="l00876"></a>00876 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_SetDotsPerMeterX(FIBITMAP *dib, <span class="keywordtype">unsigned</span> res);
<a name="l00877"></a>00877 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_SetDotsPerMeterY(FIBITMAP *dib, <span class="keywordtype">unsigned</span> res);
<a name="l00878"></a>00878
<a name="l00879"></a>00879 DLL_API BITMAPINFOHEADER *DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib);
<a name="l00880"></a>00880 DLL_API BITMAPINFO *DLL_CALLCONV FreeImage_GetInfo(FIBITMAP *dib);
<a name="l00881"></a>00881 DLL_API FREE_IMAGE_COLOR_TYPE DLL_CALLCONV FreeImage_GetColorType(FIBITMAP *dib);
<a name="l00882"></a>00882
<a name="l00883"></a>00883 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetRedMask(FIBITMAP *dib);
<a name="l00884"></a>00884 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetGreenMask(FIBITMAP *dib);
<a name="l00885"></a>00885 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib);
<a name="l00886"></a>00886
<a name="l00887"></a>00887 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib);
<a name="l00888"></a>00888 DLL_API BYTE * DLL_CALLCONV FreeImage_GetTransparencyTable(FIBITMAP *dib);
<a name="l00889"></a>00889 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_SetTransparent(FIBITMAP *dib, BOOL enabled);
<a name="l00890"></a>00890 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_SetTransparencyTable(FIBITMAP *dib, BYTE *table, <span class="keywordtype">int</span> count);
<a name="l00891"></a>00891 DLL_API BOOL DLL_CALLCONV FreeImage_IsTransparent(FIBITMAP *dib);
<a name="l00892"></a>00892 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_SetTransparentIndex(FIBITMAP *dib, <span class="keywordtype">int</span> index);
<a name="l00893"></a>00893 DLL_API <span class="keywordtype">int</span> DLL_CALLCONV FreeImage_GetTransparentIndex(FIBITMAP *dib);
<a name="l00894"></a>00894
<a name="l00895"></a>00895 DLL_API BOOL DLL_CALLCONV FreeImage_HasBackgroundColor(FIBITMAP *dib);
<a name="l00896"></a>00896 DLL_API BOOL DLL_CALLCONV FreeImage_GetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
<a name="l00897"></a>00897 DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
<a name="l00898"></a>00898
<a name="l00899"></a>00899
<a name="l00900"></a>00900 <span class="comment">// ICC profile routines -----------------------------------------------------</span>
<a name="l00901"></a>00901
<a name="l00902"></a>00902 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_GetICCProfile(FIBITMAP *dib);
<a name="l00903"></a>00903 DLL_API FIICCPROFILE *DLL_CALLCONV FreeImage_CreateICCProfile(FIBITMAP *dib, <span class="keywordtype">void</span> *data, <span class="keywordtype">long</span> size);
<a name="l00904"></a>00904 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_DestroyICCProfile(FIBITMAP *dib);
<a name="l00905"></a>00905
<a name="l00906"></a>00906 <span class="comment">// Line conversion routines -------------------------------------------------</span>
<a name="l00907"></a>00907
<a name="l00908"></a>00908 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine1To4(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00909"></a>00909 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine8To4(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00910"></a>00910 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16To4_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00911"></a>00911 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16To4_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00912"></a>00912 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine24To4(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00913"></a>00913 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine32To4(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00914"></a>00914 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine1To8(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00915"></a>00915 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine4To8(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00916"></a>00916 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16To8_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00917"></a>00917 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16To8_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00918"></a>00918 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine24To8(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00919"></a>00919 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine32To8(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00920"></a>00920 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine1To16_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00921"></a>00921 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine4To16_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00922"></a>00922 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine8To16_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00923"></a>00923 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16_565_To16_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00924"></a>00924 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine24To16_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00925"></a>00925 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine32To16_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00926"></a>00926 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine1To16_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00927"></a>00927 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine4To16_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00928"></a>00928 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine8To16_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00929"></a>00929 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16_555_To16_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00930"></a>00930 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine24To16_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00931"></a>00931 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine32To16_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00932"></a>00932 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine1To24(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00933"></a>00933 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine4To24(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00934"></a>00934 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine8To24(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00935"></a>00935 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16To24_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00936"></a>00936 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16To24_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00937"></a>00937 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine32To24(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00938"></a>00938 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine1To32(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00939"></a>00939 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine4To32(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00940"></a>00940 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine8To32(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels, RGBQUAD *palette);
<a name="l00941"></a>00941 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16To32_555(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00942"></a>00942 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine16To32_565(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00943"></a>00943 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertLine24To32(BYTE *target, BYTE *source, <span class="keywordtype">int</span> width_in_pixels);
<a name="l00944"></a>00944
<a name="l00945"></a>00945 <span class="comment">// Smart conversion routines ------------------------------------------------</span>
<a name="l00946"></a>00946
<a name="l00947"></a>00947 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo4Bits(FIBITMAP *dib);
<a name="l00948"></a>00948 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo8Bits(FIBITMAP *dib);
<a name="l00949"></a>00949 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToGreyscale(FIBITMAP *dib);
<a name="l00950"></a>00950 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits555(FIBITMAP *dib);
<a name="l00951"></a>00951 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo16Bits565(FIBITMAP *dib);
<a name="l00952"></a>00952 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo24Bits(FIBITMAP *dib);
<a name="l00953"></a>00953 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertTo32Bits(FIBITMAP *dib);
<a name="l00954"></a>00954 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantize(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);
<a name="l00955"></a>00955 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ColorQuantizeEx(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize FI_DEFAULT(FIQ_WUQUANT), <span class="keywordtype">int</span> PaletteSize FI_DEFAULT(256), <span class="keywordtype">int</span> ReserveSize FI_DEFAULT(0), RGBQUAD *ReservePalette FI_DEFAULT(NULL));
<a name="l00956"></a>00956 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Threshold(FIBITMAP *dib, BYTE T);
<a name="l00957"></a>00957 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Dither(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
<a name="l00958"></a>00958
<a name="l00959"></a>00959 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertFromRawBits(BYTE *bits, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> pitch, <span class="keywordtype">unsigned</span> bpp, <span class="keywordtype">unsigned</span> red_mask, <span class="keywordtype">unsigned</span> green_mask, <span class="keywordtype">unsigned</span> blue_mask, BOOL topdown FI_DEFAULT(FALSE));
<a name="l00960"></a>00960 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_ConvertToRawBits(BYTE *bits, FIBITMAP *dib, <span class="keywordtype">int</span> pitch, <span class="keywordtype">unsigned</span> bpp, <span class="keywordtype">unsigned</span> red_mask, <span class="keywordtype">unsigned</span> green_mask, <span class="keywordtype">unsigned</span> blue_mask, BOOL topdown FI_DEFAULT(FALSE));
<a name="l00961"></a>00961
<a name="l00962"></a>00962 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToFloat(FIBITMAP *dib);
<a name="l00963"></a>00963 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToRGBF(FIBITMAP *dib);
<a name="l00964"></a>00964
<a name="l00965"></a>00965 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToStandardType(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
<a name="l00966"></a>00966 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ConvertToType(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
<a name="l00967"></a>00967
<a name="l00968"></a>00968 <span class="comment">// tone mapping operators</span>
<a name="l00969"></a>00969 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_ToneMapping(FIBITMAP *dib, FREE_IMAGE_TMO tmo, <span class="keywordtype">double</span> first_param FI_DEFAULT(0), <span class="keywordtype">double</span> second_param FI_DEFAULT(0));
<a name="l00970"></a>00970 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoDrago03(FIBITMAP *src, <span class="keywordtype">double</span> gamma FI_DEFAULT(2.2), <span class="keywordtype">double</span> exposure FI_DEFAULT(0));
<a name="l00971"></a>00971 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05(FIBITMAP *src, <span class="keywordtype">double</span> intensity FI_DEFAULT(0), <span class="keywordtype">double</span> contrast FI_DEFAULT(0));
<a name="l00972"></a>00972 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoReinhard05Ex(FIBITMAP *src, <span class="keywordtype">double</span> intensity FI_DEFAULT(0), <span class="keywordtype">double</span> contrast FI_DEFAULT(0), <span class="keywordtype">double</span> adaptation FI_DEFAULT(1), <span class="keywordtype">double</span> color_correction FI_DEFAULT(0));
<a name="l00973"></a>00973
<a name="l00974"></a>00974 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_TmoFattal02(FIBITMAP *src, <span class="keywordtype">double</span> color_saturation FI_DEFAULT(0.5), <span class="keywordtype">double</span> attenuation FI_DEFAULT(0.85));
<a name="l00975"></a>00975
<a name="l00976"></a>00976 <span class="comment">// ZLib interface -----------------------------------------------------------</span>
<a name="l00977"></a>00977
<a name="l00978"></a>00978 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
<a name="l00979"></a>00979 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibUncompress(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
<a name="l00980"></a>00980 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
<a name="l00981"></a>00981 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibGUnzip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
<a name="l00982"></a>00982 DLL_API DWORD DLL_CALLCONV FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size);
<a name="l00983"></a>00983
<a name="l00984"></a>00984 <span class="comment">// --------------------------------------------------------------------------</span>
<a name="l00985"></a>00985 <span class="comment">// Metadata routines --------------------------------------------------------</span>
<a name="l00986"></a>00986 <span class="comment">// --------------------------------------------------------------------------</span>
<a name="l00987"></a>00987
<a name="l00988"></a>00988 <span class="comment">// tag creation / destruction</span>
<a name="l00989"></a>00989 DLL_API FITAG *DLL_CALLCONV FreeImage_CreateTag(<span class="keywordtype">void</span>);
<a name="l00990"></a>00990 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_DeleteTag(FITAG *tag);
<a name="l00991"></a>00991 DLL_API FITAG *DLL_CALLCONV FreeImage_CloneTag(FITAG *tag);
<a name="l00992"></a>00992
<a name="l00993"></a>00993 <span class="comment">// tag getters and setters</span>
<a name="l00994"></a>00994 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span> *DLL_CALLCONV FreeImage_GetTagKey(FITAG *tag);
<a name="l00995"></a>00995 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span> *DLL_CALLCONV FreeImage_GetTagDescription(FITAG *tag);
<a name="l00996"></a>00996 DLL_API WORD DLL_CALLCONV FreeImage_GetTagID(FITAG *tag);
<a name="l00997"></a>00997 DLL_API FREE_IMAGE_MDTYPE DLL_CALLCONV FreeImage_GetTagType(FITAG *tag);
<a name="l00998"></a>00998 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagCount(FITAG *tag);
<a name="l00999"></a>00999 DLL_API DWORD DLL_CALLCONV FreeImage_GetTagLength(FITAG *tag);
<a name="l01000"></a>01000 DLL_API <span class="keyword">const</span> <span class="keywordtype">void</span> *DLL_CALLCONV FreeImage_GetTagValue(FITAG *tag);
<a name="l01001"></a>01001
<a name="l01002"></a>01002 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagKey(FITAG *tag, <span class="keyword">const</span> <span class="keywordtype">char</span> *key);
<a name="l01003"></a>01003 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagDescription(FITAG *tag, <span class="keyword">const</span> <span class="keywordtype">char</span> *description);
<a name="l01004"></a>01004 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagID(FITAG *tag, WORD <span class="keywordtype">id</span>);
<a name="l01005"></a>01005 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagType(FITAG *tag, FREE_IMAGE_MDTYPE type);
<a name="l01006"></a>01006 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagCount(FITAG *tag, DWORD count);
<a name="l01007"></a>01007 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagLength(FITAG *tag, DWORD length);
<a name="l01008"></a>01008 DLL_API BOOL DLL_CALLCONV FreeImage_SetTagValue(FITAG *tag, <span class="keyword">const</span> <span class="keywordtype">void</span> *value);
<a name="l01009"></a>01009
<a name="l01010"></a>01010 <span class="comment">// iterator</span>
<a name="l01011"></a>01011 DLL_API FIMETADATA *DLL_CALLCONV FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
<a name="l01012"></a>01012 DLL_API BOOL DLL_CALLCONV FreeImage_FindNextMetadata(FIMETADATA *mdhandle, FITAG **tag);
<a name="l01013"></a>01013 DLL_API <span class="keywordtype">void</span> DLL_CALLCONV FreeImage_FindCloseMetadata(FIMETADATA *mdhandle);
<a name="l01014"></a>01014
<a name="l01015"></a>01015 <span class="comment">// metadata setter and getter</span>
<a name="l01016"></a>01016 DLL_API BOOL DLL_CALLCONV FreeImage_SetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, FITAG *tag);
<a name="l01017"></a>01017 DLL_API BOOL DLL_CALLCONV FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, FITAG **tag);
<a name="l01018"></a>01018
<a name="l01019"></a>01019 <span class="comment">// helpers</span>
<a name="l01020"></a>01020 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
<a name="l01021"></a>01021 DLL_API BOOL DLL_CALLCONV FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src);
<a name="l01022"></a>01022
<a name="l01023"></a>01023 <span class="comment">// tag to C string conversion</span>
<a name="l01024"></a>01024 DLL_API <span class="keyword">const</span> <span class="keywordtype">char</span>* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, FITAG *tag, <span class="keywordtype">char</span> *Make FI_DEFAULT(NULL));
<a name="l01025"></a>01025
<a name="l01026"></a>01026 <span class="comment">// --------------------------------------------------------------------------</span>
<a name="l01027"></a>01027 <span class="comment">// Image manipulation toolkit -----------------------------------------------</span>
<a name="l01028"></a>01028 <span class="comment">// --------------------------------------------------------------------------</span>
<a name="l01029"></a>01029
<a name="l01030"></a>01030 <span class="comment">// rotation and flipping</span>
<a name="l01032"></a>01032 <span class="comment"></span>DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib, <span class="keywordtype">double</span> angle);
<a name="l01033"></a>01033 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rotate(FIBITMAP *dib, <span class="keywordtype">double</span> angle, <span class="keyword">const</span> <span class="keywordtype">void</span> *bkcolor FI_DEFAULT(NULL));
<a name="l01034"></a>01034 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateEx(FIBITMAP *dib, <span class="keywordtype">double</span> angle, <span class="keywordtype">double</span> x_shift, <span class="keywordtype">double</span> y_shift, <span class="keywordtype">double</span> x_origin, <span class="keywordtype">double</span> y_origin, BOOL use_mask);
<a name="l01035"></a>01035 DLL_API BOOL DLL_CALLCONV FreeImage_FlipHorizontal(FIBITMAP *dib);
<a name="l01036"></a>01036 DLL_API BOOL DLL_CALLCONV FreeImage_FlipVertical(FIBITMAP *dib);
<a name="l01037"></a>01037 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(<span class="keyword">const</span> <span class="keywordtype">char</span> *src_file, <span class="keyword">const</span> <span class="keywordtype">char</span> *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE));
<a name="l01038"></a>01038 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *src_file, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE));
<a name="l01039"></a>01039
<a name="l01040"></a>01040 <span class="comment">// upsampling / downsampling</span>
<a name="l01041"></a>01041 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Rescale(FIBITMAP *dib, <span class="keywordtype">int</span> dst_width, <span class="keywordtype">int</span> dst_height, FREE_IMAGE_FILTER filter);
<a name="l01042"></a>01042 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MakeThumbnail(FIBITMAP *dib, <span class="keywordtype">int</span> max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
<a name="l01043"></a>01043
<a name="l01044"></a>01044 <span class="comment">// color manipulation routines (point operations)</span>
<a name="l01045"></a>01045 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustCurve(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
<a name="l01046"></a>01046 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustGamma(FIBITMAP *dib, <span class="keywordtype">double</span> gamma);
<a name="l01047"></a>01047 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustBrightness(FIBITMAP *dib, <span class="keywordtype">double</span> percentage);
<a name="l01048"></a>01048 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustContrast(FIBITMAP *dib, <span class="keywordtype">double</span> percentage);
<a name="l01049"></a>01049 DLL_API BOOL DLL_CALLCONV FreeImage_Invert(FIBITMAP *dib);
<a name="l01050"></a>01050 DLL_API BOOL DLL_CALLCONV FreeImage_GetHistogram(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel FI_DEFAULT(FICC_BLACK));
<a name="l01051"></a>01051 DLL_API <span class="keywordtype">int</span> DLL_CALLCONV FreeImage_GetAdjustColorsLookupTable(BYTE *LUT, <span class="keywordtype">double</span> brightness, <span class="keywordtype">double</span> contrast, <span class="keywordtype">double</span> gamma, BOOL invert);
<a name="l01052"></a>01052 DLL_API BOOL DLL_CALLCONV FreeImage_AdjustColors(FIBITMAP *dib, <span class="keywordtype">double</span> brightness, <span class="keywordtype">double</span> contrast, <span class="keywordtype">double</span> gamma, BOOL invert FI_DEFAULT(FALSE));
<a name="l01053"></a>01053 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_ApplyColorMapping(FIBITMAP *dib, RGBQUAD *srccolors, RGBQUAD *dstcolors, <span class="keywordtype">unsigned</span> count, BOOL ignore_alpha, BOOL swap);
<a name="l01054"></a>01054 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_SwapColors(FIBITMAP *dib, RGBQUAD *color_a, RGBQUAD *color_b, BOOL ignore_alpha);
<a name="l01055"></a>01055 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_ApplyPaletteIndexMapping(FIBITMAP *dib, BYTE *srcindices, BYTE *dstindices, <span class="keywordtype">unsigned</span> count, BOOL swap);
<a name="l01056"></a>01056 DLL_API <span class="keywordtype">unsigned</span> DLL_CALLCONV FreeImage_SwapPaletteIndices(FIBITMAP *dib, BYTE *index_a, BYTE *index_b);
<a name="l01057"></a>01057
<a name="l01058"></a>01058 <span class="comment">// channel processing routines</span>
<a name="l01059"></a>01059 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetChannel(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
<a name="l01060"></a>01060 DLL_API BOOL DLL_CALLCONV FreeImage_SetChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
<a name="l01061"></a>01061 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_GetComplexChannel(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
<a name="l01062"></a>01062 DLL_API BOOL DLL_CALLCONV FreeImage_SetComplexChannel(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
<a name="l01063"></a>01063
<a name="l01064"></a>01064 <span class="comment">// copy / paste / composite routines</span>
<a name="l01065"></a>01065 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Copy(FIBITMAP *dib, <span class="keywordtype">int</span> left, <span class="keywordtype">int</span> top, <span class="keywordtype">int</span> right, <span class="keywordtype">int</span> bottom);
<a name="l01066"></a>01066 DLL_API BOOL DLL_CALLCONV FreeImage_Paste(FIBITMAP *dst, FIBITMAP *src, <span class="keywordtype">int</span> left, <span class="keywordtype">int</span> top, <span class="keywordtype">int</span> alpha);
<a name="l01067"></a>01067 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_Composite(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
<a name="l01068"></a>01068 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(<span class="keyword">const</span> <span class="keywordtype">char</span> *src_file, <span class="keyword">const</span> <span class="keywordtype">char</span> *dst_file, <span class="keywordtype">int</span> left, <span class="keywordtype">int</span> top, <span class="keywordtype">int</span> right, <span class="keywordtype">int</span> bottom);
<a name="l01069"></a>01069 DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCropU(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *src_file, <span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *dst_file, <span class="keywordtype">int</span> left, <span class="keywordtype">int</span> top, <span class="keywordtype">int</span> right, <span class="keywordtype">int</span> bottom);
<a name="l01070"></a>01070 DLL_API BOOL DLL_CALLCONV FreeImage_PreMultiplyWithAlpha(FIBITMAP *dib);
<a name="l01071"></a>01071
<a name="l01072"></a>01072 <span class="comment">// background filling routines</span>
<a name="l01073"></a>01073 DLL_API BOOL DLL_CALLCONV FreeImage_FillBackground(FIBITMAP *dib, <span class="keyword">const</span> <span class="keywordtype">void</span> *color, <span class="keywordtype">int</span> options FI_DEFAULT(0));
<a name="l01074"></a>01074 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_EnlargeCanvas(FIBITMAP *src, <span class="keywordtype">int</span> left, <span class="keywordtype">int</span> top, <span class="keywordtype">int</span> right, <span class="keywordtype">int</span> bottom, <span class="keyword">const</span> <span class="keywordtype">void</span> *color, <span class="keywordtype">int</span> options FI_DEFAULT(0));
<a name="l01075"></a>01075 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateEx(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> bpp, <span class="keyword">const</span> RGBQUAD *color, <span class="keywordtype">int</span> options FI_DEFAULT(0), <span class="keyword">const</span> RGBQUAD *palette FI_DEFAULT(NULL), <span class="keywordtype">unsigned</span> red_mask FI_DEFAULT(0), <span class="keywordtype">unsigned</span> green_mask FI_DEFAULT(0), <span class="keywordtype">unsigned</span> blue_mask FI_DEFAULT(0));
<a name="l01076"></a>01076 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_AllocateExT(FREE_IMAGE_TYPE type, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> bpp, <span class="keyword">const</span> <span class="keywordtype">void</span> *color, <span class="keywordtype">int</span> options FI_DEFAULT(0), <span class="keyword">const</span> RGBQUAD *palette FI_DEFAULT(NULL), <span class="keywordtype">unsigned</span> red_mask FI_DEFAULT(0), <span class="keywordtype">unsigned</span> green_mask FI_DEFAULT(0), <span class="keywordtype">unsigned</span> blue_mask FI_DEFAULT(0));
<a name="l01077"></a>01077
<a name="l01078"></a>01078 <span class="comment">// miscellaneous algorithms</span>
<a name="l01079"></a>01079 DLL_API FIBITMAP *DLL_CALLCONV FreeImage_MultigridPoissonSolver(FIBITMAP *Laplacian, <span class="keywordtype">int</span> ncycle FI_DEFAULT(3));
<a name="l01080"></a>01080
<a name="l01081"></a>01081 <span class="comment">// restore the borland-specific enum size option</span>
<a name="l01082"></a>01082 <span class="preprocessor">#if defined(__BORLANDC__)</span>
<a name="l01083"></a>01083 <span class="preprocessor"></span><span class="preprocessor">#pragma option pop</span>
<a name="l01084"></a>01084 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l01085"></a>01085 <span class="preprocessor"></span>
<a name="l01086"></a>01086 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l01087"></a>01087 <span class="preprocessor"></span>}
<a name="l01088"></a>01088 <span class="preprocessor">#endif</span>
<a name="l01089"></a>01089 <span class="preprocessor"></span>
<a name="l01090"></a>01090 <span class="preprocessor">#endif // FREEIMAGE_H</span>
</pre></div><hr>
<p align="right">
<img src="freeimage.png"><br>
</p>
</BODY>
</HTML>