DevIL_manual (Задания)
Описание файла
Файл "DevIL_manual" внутри архива находится в следующих папках: Задания, DevIL. PDF-файл из архива "Задания", который расположен в категории "". Всё это находится в предмете "технология cuda на кластерах с gpu" из 12 семестр (4 семестр магистратуры), которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .
Просмотр PDF-файла онлайн
Текст из PDF
Developer’s Image Library manualc 2008This is DevIL manual. Copyright iTable of Contents1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.11.22General introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 1Library Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Library setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22.1Microsoft Visual C++ setup. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.1 Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.2 MSVC++ Bug Workaround . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.1.3 Multithreading . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.2 DJGPP Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2.3 General GCC-based (Linux, Cygwin, Max OS X, etc.) Setup . . . .3Basic usage . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.1Initializing DevIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.1.1 IL Initialization . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .3.1.2 ILU Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.1.3 ILUT Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2 Image Name Handling . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.1 Generating Image Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.2 Binding Image Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.2.3 Deleting Image Names . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.3 File handling – loading images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.3.1 Loading from Files – ilLoadImage . . . . . . . . . . . . . . . . .
. . . . . . . .3.3.2 Loading from Files – ilLoad. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.3.3 Loading from File Streams – ilLoadF . . . . . . . . . . . . . . . . . . . . . .3.3.4 Loading from Memory Lumps – ilLoadL . . . . . . . . . . . . . . . . . .3.3.5 Saving to Files . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .422334455555566667777Image Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.14.2Defining Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Getting Image Data . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.2.1 The Quick Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.2.2 The Flexible Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.3 Copying Images . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.3.1 Direct Copying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.3.2 Blitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 94.3.3 Overlaying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.3.4 Blit/Overlay Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Image Characteristics . . . . . . . . .
. . . . . . . . . . . . . . . . 115.1Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11ii6Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126.16.27Error Detection . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Error Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.2.1 Languages . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .6.2.2 Selecting a Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12121212Image Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 137.17.27.37.47.57.67.77.87.98Alienifying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .Blurring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . .Equalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Gamma Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Negativity . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Pixelization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .Sharpening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131314141415151616Resizing Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178.18.28.39Basic Scaling. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Advanced Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Filter Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Sub-Images. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 199.1Mipmaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.1.1 Mipmap Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.1.2 Mipmap Access . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.2 Animations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.2.1 Animation Chain Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.2.2 Animation Chain Access . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .9.3 Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9.4 Sub-Image Mixing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . .101919191919192020DXTC/S3TC Notes . . . . . . . . . . . . . . . . . . . . . . . . . . 2110.1 DDS Loading/Saving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10.1.1 Keeping DXTC Data . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .10.1.2 Controlling Saving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10.2 Retrieving DXTC Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10.3 OpenGL/Direct3D DXTC Support . . . . . . .
. . . . . . . . . . . . . . . . . . . .10.3.1 OpenGL S3TC Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10.3.2 Direct3D DXTC Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Appendix A21212121212122Common DevIL #defines . . . . . . . . 23A.1 format-related #defines . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23A.2 type-related #defines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23A.3 Language-related #defines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23iiiAppendix BCommon DevIL Error Codes .
. . . 24Appendix CSupported File Formats . . . . . . . . . . 25Appendix DSample DevIL program . . . . . . . . . . 26Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Chapter 1: Introduction11 Introduction1.1 General introductionDeveloper’s Image Library was previously called OpenIL, but due to trademark issues,OpenIL is now known as DevIL.DevIL is an Open Source programming library for programmers to incorporate intotheir own programs. DevIL loads and saves a large variety of images for use in a softwaredeveloper’s program.
This library is capable of manipulating images in various ways andpassing image information to display APIs, such as OpenGL and Direct3D.The purpose of this manual is to guide users in coding with the Developer’s ImageLibrary. This manual is for users proficient in C and with competent knowledge of theintegrated development environment (IDE) or compiler they are using.1.2 Library ReferenceSeveral times throughout this document, the three different sub-libraries of DevIL are referenced as IL, ILU and ILUT. IL refers to the base library for loading, saving and convertingimages.
ILU refers to the middle level library for image manipulation. ILUT refers to thehigh level library for displaying images. Functions in IL, ILU and ILUT are prefixed by il’,ilu’ and ilut’, respectively.Chapter 2: Library setup22 Library setup2.1 Microsoft Visual C++ setupDevIL setup for Windows is straightforward. Unzip DevIL in an empty directory. If usingWinZip, check the “Use folder names” box before unzipping. Use the -d command lineoption if using pkunzip.
Then double-click on the ImageLib.sln file in the install directoryto load the DevIL workspace in Microsoft Visual C++ (MSVC++).2.1.1 DirectoriesYou will need to change some directory settings in MSVC++ to get DevIL working.1. Navigate to the Tools menu and select Options.2. Click on the Directories tab.3. Under Show directories for, select “Include files”.4. Click the New button (to the left of the red ’X’)5.
Type the directory DevIL is installed in, plus ‘\Include’.For example, if you installed DevIL to E:\ImageLib, enter ‘E:\ImageLib\Include’.6. Under Show directories for, click on “Library files”.7. Click the New button (to the left of the red ’X’).8. TypethedirectoryDevILisinstalledin,plus‘\Lib’.Forexam-Chapter 2: Library setupple,ifyouinstalled3DevILtoE:\ImageLib,enter‘E:\ImageLib\Lib’.9. Click the New button (to the left of the red X’).10. Type the directory DevIL is installed in, plus ‘\Lib\Debug’. In the previous example,you would enter ‘E:\ImageLib\Lib\Debug’.11. Choose OK.2.1.2 MSVC++ Bug WorkaroundMicrosoft Visual C++ 6.0 has a bug that prevents debugging of a project.