Nov 19, 2017 DevIL Developer's Image Library (DevIL) is a cross-platform image library utilizing a simple syntax to load, save, convert, manipulate, filter, and display a variety of images with ease. It is highly portable and has been ported to several platforms. If the current bound image is in a format that is not support by the destination file, DevIL will automatically convert the current image to a format natively support by the destination file format. The current image is actually left alone, and a copy is made, which is converted, saved, then deleted, so there is no fear of DevIL destroying your carefully constructed images.
About News Download SourceForge Home Documentation Tutorials Logos Links Projects Contact Us | Beginner's Step-by-Step TutorialLast Revised: 11:13 PM 12/20/2000 The task of using DevIL may seem daunting at first, with the multitudes of functions available, but DevIL is actually relatively easy to use. This tutorial will show you how to create a simple DevIL application to load, save and display a variety of images. Checking Versions Example of version checking. Initializing the Library Image Names ILuint ImageName; Next, generate an image name to be put in this variable: ilGenImages(1, &ImageName); Now bind this image name so that DevIL performs all subsequent operations on this image: ilBindImage(ImageName); Creating images is as simple as that. No messy pointers or anything else to mess with. To get an in-depth explanation of image names, read the tutorial on them. Loading an Image Code for loading an image. Saving an Image Code for saving an image. Checking for Errors For a more in-depth discussion of errors, read the tutorial on them. Code for detecting an error. Image Information Code for getting an image's width and height. Image Data Code for getting the image data. Display the Image For a much more in-depth discussion of using DevIL with OpenGL, read this tutorial. Before you call any ilut functions dealing with OpenGL and after you have initialized OpenGL, you *must* call ilutRenderer with the ILUT_OPENGL parameter to initialize ilut correctly. Most applications will then only need to call ilutGLBindTexImage to get a corresponding OpenGL texture from the DevIL image. If you only need to use the OpenGL texture and not the DevIL image after this, it is safe to delete the image. Example of getting an OpenGL texture. Deleting an Image Example of deleting an image. |
Devil Image Library Mac Torrent
About News Download SourceForge Home Documentation Tutorials Logos Links Projects Contact Us | Tutorial 1: Setting up DevIL in MSVC++ Last Revised: 9:24 PM 07/31/2001 DevIL setup for Windows is fairly straightforward. Of course you need to unzip DevIL into an empty directory. All files in the DevIL source zip are in the /ImageLib directory, so make sure 'Use folder names' is checked if unzipping with WinZip. After DevIL is unzipped, double-click on the ImageLib.dsw file to load the workspace in MSVC++. Directories Some settings need to be altered to get DevIL working. First, navigate to Tools - Options, then click on the Directories tab. Under Directory Settings Dialog in MSVC++ Under Directory Settings Dialog in MSVC++ Post-Build If your Windows system directory is C:/Windows/System, you can skip this section. Go to the Project - Settings menu, then click on the Post-build step tab. Click on the DevIL project in the left pane. In the right pane, it will say something similar to: copy '../bin/DevIL.dll' c:/windows/system Change the c:/windows/system part to reflect your Windows/System directory. Perform this step for ilu and ilut, and make sure to do it for both the release and debug builds. To switch between debug and release, change the value in the drop-down box next to Settings for: to whatever build you need to edit. Click the OK button when you are finished. DevIL is now ready to compile. To compile a certain project in the DevIL workspace, right-click on its name and choose Set as Active Project. Most projects have dependencies on DevIL, so when you compile these projects, they automatically compile the needed DevIL files. Usage To properly use DevIL from within your own project, you must set an option required to let DevIL use file streams. Go into your project's settings (Project - Settings), and go to the C/C++ tab. Change the Category: box to Code Generation. If you are editing the debug build of your project, choose Multithreaded DLL in the 'Use run-time library:' drop down menu. If you are editing the release build of your project, choose 'Multithreaded DLL' in the same menu. If this option is not set, and you pass a file stream to DevIL, DevIL will die a horrible death, because the file streams aren't shared between processes if this is not set. Project Debug Settings Dialog in MSVC++ |