⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 il.h

📁 SiftGPU is an implementation of SIFT [1] for GPU. SiftGPU processes pixels parallely to build Gaussi
💻 H
📖 第 1 页 / 共 2 页
字号:
//-----------------------------------------------------------------------------//// ImageLib Sources// Copyright (C) 2000-2009 by Denton Woods// Last modified: 02/05/2009//// Filename: IL/il.h//// Description: The main include file for DevIL////-----------------------------------------------------------------------------// Doxygen comment/*! \file il.h    The main include file for DevIL*/#ifndef __il_h_#ifndef __IL_H__#define __il_h_#define __IL_H__#ifdef __cplusplusextern "C" {#endif//this define controls if floats and doubles are clampled to [0..1]//during conversion. It takes a little more time, but it is the correct//way of doing this. If you are sure your floats are always valid,//you can undefine this value...#define CLAMP_HALF		1#define CLAMP_FLOATS	1#define CLAMP_DOUBLES	1/*#ifdef _WIN32_WCE	#define IL_NO_EXR	#define IL_NO_GIF	#define IL_NO_JP2	#define IL_NO_JPG	#define IL_NO_MNG	#define IL_NO_PNG	#define IL_NO_TIF	#define IL_NO_LCMS#endif //_WIN32_WCE#ifdef DJGPP	#define IL_NO_EXR	#define IL_NO_GIF	#define IL_NO_JP2	#define IL_NO_JPG	#define IL_NO_MNG	#define IL_NO_PNG	#define IL_NO_TIF	#define IL_NO_LCMS#endif //DJGPP*/#ifdef _WIN32	#if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))		#if defined(_MSC_VER) || defined(__BORLANDC__)			#pragma comment(lib, "DevIL.lib")		#endif	#endif#endif#ifdef RESTRICT_KEYWORD#define RESTRICT restrict#define CONST_RESTRICT const restrict#else#define RESTRICT#define CONST_RESTRICT const#endif#include <stdio.h>typedef unsigned int   ILenum;typedef unsigned char  ILboolean;typedef unsigned int   ILbitfield;typedef signed char    ILbyte;typedef signed short   ILshort;typedef int     	   ILint;typedef size_t         ILsizei;typedef unsigned char  ILubyte;typedef unsigned short ILushort;typedef unsigned int   ILuint;typedef float          ILfloat;typedef float          ILclampf;typedef double         ILdouble;typedef double         ILclampd;#ifdef _MSC_VERtypedef __int64          ILint64;typedef unsigned __int64 ILuint64;#elsetypedef long long int          ILint64;typedef long long unsigned int ILuint64;#endif#include <limits.h>#ifdef _UNICODE	#ifndef _WIN32_WCE		#include <wchar.h>	#endif	//if we use a define instead of a typedef,	//ILconst_string works as intended	#define ILchar wchar_t	#define ILstring wchar_t*	#define ILconst_string  wchar_t const *#else	//if we use a define instead of a typedef,	//ILconst_string works as intended	#define ILchar char	#define ILstring char*	#define ILconst_string char const *#endif //_UNICODE#define IL_FALSE			0#define IL_TRUE				1//  Matches OpenGL's right now.//! Data formats \link Formats Formats\endlink#define IL_COLOUR_INDEX     0x1900#define IL_COLOR_INDEX      0x1900#define IL_ALPHA			0x1906#define IL_RGB              0x1907#define IL_RGBA             0x1908#define IL_BGR              0x80E0#define IL_BGRA             0x80E1#define IL_LUMINANCE        0x1909#define IL_LUMINANCE_ALPHA  0x190A//! Data types \link Types Types\endlink#define IL_BYTE           0x1400#define IL_UNSIGNED_BYTE  0x1401#define IL_SHORT          0x1402#define IL_UNSIGNED_SHORT 0x1403#define IL_INT            0x1404#define IL_UNSIGNED_INT   0x1405#define IL_FLOAT          0x1406#define IL_DOUBLE         0x140A#define IL_HALF           0x140B#define IL_MAX_BYTE		  		SCHAR_MAX#define IL_MAX_UNSIGNED_BYTE  	UCHAR_MAX#define IL_MAX_SHORT	  		SHRT_MAX#define IL_MAX_UNSIGNED_SHORT 	USHRT_MAX#define IL_MAX_INT		  		INT_MAX#define IL_MAX_UNSIGNED_INT   	UINT_MAX#define IL_LIMIT(x,m,M)		(x<m?m:(x>M?M:x))#define IL_CLAMP(x) 		IL_LIMIT(x,0,1)#define IL_VENDOR   0x1F00#define IL_LOAD_EXT 0x1F01#define IL_SAVE_EXT 0x1F02//// IL-specific #define's//#define IL_VERSION_1_7_7 1#define IL_VERSION       177// Attribute Bits#define IL_ORIGIN_BIT          0x00000001#define IL_FILE_BIT            0x00000002#define IL_PAL_BIT             0x00000004#define IL_FORMAT_BIT          0x00000008#define IL_TYPE_BIT            0x00000010#define IL_COMPRESS_BIT        0x00000020#define IL_LOADFAIL_BIT        0x00000040#define IL_FORMAT_SPECIFIC_BIT 0x00000080#define IL_ALL_ATTRIB_BITS     0x000FFFFF// Palette types#define IL_PAL_NONE   0x0400#define IL_PAL_RGB24  0x0401#define IL_PAL_RGB32  0x0402#define IL_PAL_RGBA32 0x0403#define IL_PAL_BGR24  0x0404#define IL_PAL_BGR32  0x0405#define IL_PAL_BGRA32 0x0406// Image types#define IL_TYPE_UNKNOWN 0x0000#define IL_BMP          0x0420  //!< Microsoft Windows Bitmap - .bmp extension#define IL_CUT          0x0421  //!< Dr. Halo - .cut extension#define IL_DOOM         0x0422  //!< DooM walls - no specific extension#define IL_DOOM_FLAT    0x0423  //!< DooM flats - no specific extension#define IL_ICO          0x0424  //!< Microsoft Windows Icons and Cursors - .ico and .cur extensions#define IL_JPG          0x0425  //!< JPEG - .jpg, .jpe and .jpeg extensions#define IL_JFIF         0x0425  //!<#define IL_LBM          0x0426  //!< Interlaced bitmap - .lbm extension#define IL_PCD          0x0427  //!< Kodak PhotoCD - .pcd extension#define IL_PCX          0x0428  //!< ZSoft PCX - .pcx extension#define IL_PIC          0x0429  //!< PIC - .pic extension#define IL_PNG          0x042A  //!< Portable Network Graphics - .png extension#define IL_PNM          0x042B  //!< Portable Any Map - .pbm, .pgm, .ppm and .pnm extensions#define IL_SGI          0x042C  //!< Silicon Graphics - .sgi, .bw, .rgb and .rgba extensions#define IL_TGA          0x042D  //!< TrueVision Targa File - .tga, .vda, .icb and .vst extensions#define IL_TIF          0x042E  //!< Tagged Image File Format - .tif and .tiff extensions#define IL_CHEAD        0x042F  //!< C-Style Header - .h extension#define IL_RAW          0x0430  //!< Raw Image Data - any extension#define IL_MDL          0x0431  //!< Half-Life Model Texture - .mdl extension#define IL_WAL          0x0432  //!< Quake 2 Texture - .wal extension#define IL_LIF          0x0434  //!< Homeworld Texture - .lif extension#define IL_MNG          0x0435  //!< Multiple-image Network Graphics - .mng extension#define IL_JNG          0x0435  //!< #define IL_GIF          0x0436  //!< Graphics Interchange Format - .gif extension#define IL_DDS          0x0437  //!< DirectDraw Surface - .dds extension#define IL_DCX          0x0438  //!< ZSoft Multi-PCX - .dcx extension#define IL_PSD          0x0439  //!< Adobe PhotoShop - .psd extension#define IL_EXIF         0x043A  //!< #define IL_PSP          0x043B  //!< PaintShop Pro - .psp extension#define IL_PIX          0x043C  //!< PIX - .pix extension#define IL_PXR          0x043D  //!< Pixar - .pxr extension#define IL_XPM          0x043E  //!< X Pixel Map - .xpm extension#define IL_HDR          0x043F  //!< Radiance High Dynamic Range - .hdr extension#define IL_ICNS			0x0440  //!< Macintosh Icon - .icns extension#define IL_JP2			0x0441  //!< Jpeg 2000 - .jp2 extension#define IL_EXR			0x0442  //!< OpenEXR - .exr extension#define IL_WDP			0x0443  //!< #define IL_VTF			0x0444  //!< Valve Texture Format - .vtf extension#define IL_WBMP			0x0445  //!< Wireless Bitmap - .wbmp extension#define IL_SUN			0x0446  //!< Sun Raster - .sun, .ras, .rs, .im1, .im8, .im24 and .im32 extensions#define IL_IFF			0x0447  //!< Interchange File Format - .iff extension#define IL_TPL			0x0448  //!< Gamecube Texture - .tpl extension#define IL_JASC_PAL     0x0475  //!< PaintShop Pro Palette// Error Types#define IL_NO_ERROR             0x0000#define IL_INVALID_ENUM         0x0501#define IL_OUT_OF_MEMORY        0x0502#define IL_FORMAT_NOT_SUPPORTED 0x0503#define IL_INTERNAL_ERROR       0x0504#define IL_INVALID_VALUE        0x0505#define IL_ILLEGAL_OPERATION    0x0506#define IL_ILLEGAL_FILE_VALUE   0x0507#define IL_INVALID_FILE_HEADER  0x0508#define IL_INVALID_PARAM        0x0509#define IL_COULD_NOT_OPEN_FILE  0x050A#define IL_INVALID_EXTENSION    0x050B#define IL_FILE_ALREADY_EXISTS  0x050C#define IL_OUT_FORMAT_SAME      0x050D#define IL_STACK_OVERFLOW       0x050E#define IL_STACK_UNDERFLOW      0x050F#define IL_INVALID_CONVERSION   0x0510#define IL_BAD_DIMENSIONS       0x0511#define IL_FILE_READ_ERROR      0x0512  // 05/12/2002: Addition by Sam.#define IL_FILE_WRITE_ERROR     0x0512#define IL_LIB_GIF_ERROR  0x05E1#define IL_LIB_JPEG_ERROR 0x05E2#define IL_LIB_PNG_ERROR  0x05E3#define IL_LIB_TIFF_ERROR 0x05E4#define IL_LIB_MNG_ERROR  0x05E5#define IL_LIB_JP2_ERROR  0x05E6#define IL_LIB_EXR_ERROR  0x05E7#define IL_UNKNOWN_ERROR  0x05FF// Origin Definitions#define IL_ORIGIN_SET        0x0600#define IL_ORIGIN_LOWER_LEFT 0x0601#define IL_ORIGIN_UPPER_LEFT 0x0602#define IL_ORIGIN_MODE       0x0603// Format and Type Mode Definitions#define IL_FORMAT_SET  0x0610#define IL_FORMAT_MODE 0x0611#define IL_TYPE_SET    0x0612#define IL_TYPE_MODE   0x0613// File definitions#define IL_FILE_OVERWRITE	0x0620#define IL_FILE_MODE		0x0621// Palette definitions#define IL_CONV_PAL			0x0630// Load fail definitions#define IL_DEFAULT_ON_FAIL	0x0632// Key colour and alpha definitions#define IL_USE_KEY_COLOUR	0x0635#define IL_USE_KEY_COLOR	0x0635#define IL_BLIT_BLEND		0x0636// Interlace definitions#define IL_SAVE_INTERLACED	0x0639#define IL_INTERLACE_MODE	0x063A// Quantization definitions#define IL_QUANTIZATION_MODE 0x0640#define IL_WU_QUANT          0x0641#define IL_NEU_QUANT         0x0642#define IL_NEU_QUANT_SAMPLE  0x0643#define IL_MAX_QUANT_INDEXS  0x0644 //XIX : ILint : Maximum number of colors to reduce to, default of 256. and has a range of 2-256#define IL_MAX_QUANT_INDICES 0x0644 // Redefined, since the above #define is misspelled

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -