📄 il.h
字号:
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 06/23/2002 <--Y2K Compliant! =]
//
// Filename: IL/il.h
//
// Description: The main include file for DevIL
//
//-----------------------------------------------------------------------------
#ifndef __il_h_
#ifndef __IL_H__
#define __il_h_
#define __IL_H__
#ifdef __cplusplus
extern "C" {
#endif
//#define IL_NO_BMP
//#define IL_NO_CUT
//#define IL_NO_CHEAD
//#define IL_NO_DCX
//#define IL_NO_DDS
//#define IL_NO_DOOM
//#define IL_NO_GIF
//#define IL_NO_ICO
//#define IL_NO_JPG
//#define IL_NO_LIF
//#define IL_NO_MDL
//#define IL_NO_MNG
//#define IL_NO_PCD
//#define IL_NO_PCX
//#define IL_NO_PIC
//#define IL_NO_PIX
//#define IL_NO_PNG
//#define IL_NO_PNM
//#define IL_NO_PSD
//#define IL_NO_PSP
//#define IL_NO_PXR
//#define IL_NO_RAW
//#define IL_NO_SGI
//#define IL_NO_TGA
//#define IL_NO_TIF
//#define IL_NO_WAL
//#define IL_NO_XPM
// Compiling Options
#define IL_INLINE_ASM
//#define IL_DEBUG
//#define IL_STATIC_LIB
//#define IL_NO_LCMS
#ifdef _WIN32
#define IL_USE_JPEGLIB_UNMODIFIED
#endif
#ifdef _WIN32_WCE
#define IL_NO_GIF
#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_GIF
#define IL_NO_JPG
#define IL_NO_MNG
#define IL_NO_PNG
#define IL_NO_TIF
#define IL_NO_LCMS
#endif//DJGPP
/*#ifdef __APPLE__
#define IL_NO_GIF
#define IL_NO_JPG
#define IL_NO_MNG
#define IL_NO_PNG
#define IL_NO_TIF
#define IL_NO_LCMS
#endif//__APPLE__*/
#ifdef _WIN32
//#define IL_USE_IJL // Whether we use the Intel Jpeg Library (else use libjpeg).
#ifndef IL_STATIC_LIB
#if defined(_MSC_VER) || defined(__BORLANDC__)
#ifndef _IL_BUILD_LIBRARY
#ifdef IL_DEBUG
#pragma comment(lib, "devil-d.lib")
#else
#pragma comment(lib, "devil.lib")
#endif//IL_DEBUG
#endif//_IL_BUILD_LIBRARY
#endif//_MSC_VER || __BORLANDC__
#endif//IL_STATIC_LIB
#endif//_WIN32
#include <stdio.h>
typedef unsigned int ILenum;
typedef unsigned char ILboolean;
typedef unsigned int ILbitfield;
typedef char ILbyte;
typedef short ILshort;
typedef int ILint;
typedef int 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;
typedef void ILvoid;
#ifdef _UNICODE
#ifndef _WIN32_WCE
#include <wchar.h>
#endif
typedef wchar_t* ILstring;
#else
typedef char* ILstring;
#endif//_UNICODE
#define IL_FALSE 0
#define IL_TRUE 1
// Matches OpenGL's right now.
#define IL_COLOUR_INDEX 0x1900
#define IL_COLOR_INDEX 0x1900
#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
#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_VENDOR 0x1F00
#define IL_LOAD_EXT 0x1F01
#define IL_SAVE_EXT 0x1F02
//
// IL-specific #define's
//
#define IL_VERSION_1_6_1 1
#define IL_VERSION 161
// 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
#define IL_CUT 0x0421
#define IL_DOOM 0x0422
#define IL_DOOM_FLAT 0x0423
#define IL_ICO 0x0424
#define IL_JPG 0x0425
#define IL_JFIF 0x0425
#define IL_LBM 0x0426
#define IL_PCD 0x0427
#define IL_PCX 0x0428
#define IL_PIC 0x0429
#define IL_PNG 0x042A
#define IL_PNM 0x042B
#define IL_SGI 0x042C
#define IL_TGA 0x042D
#define IL_TIF 0x042E
#define IL_CHEAD 0x042F
#define IL_RAW 0x0430
#define IL_MDL 0x0431
#define IL_WAL 0x0432
#define IL_LIF 0x0434
#define IL_MNG 0x0435
#define IL_JNG 0x0435
#define IL_GIF 0x0436
#define IL_DDS 0x0437
#define IL_DCX 0x0438
#define IL_PSD 0x0439
#define IL_EXIF 0x043A
#define IL_PSP 0x043B
#define IL_PIX 0x043C
#define IL_PXR 0x043D
#define IL_XPM 0x043E
#define IL_JASC_PAL 0x0475
// 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_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 definitions
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -