DEVIL.NET has been included in the main DEVIL distribution

Go to the DevIL image library website for the entire package. Here after you can find the older releases and, when a new one will get released, the newer ones.


I’ve written a small wrap around the DevIL image library .

As for the .NET viewer, this is a “2 hour project” – that is a project I’ve written in 2 hours before going to sleep.. so no warranty is included! ;)

NOTE : This project is intentionally minimalist. If you want a more complete wrapper over DevIL, have a look at the Tao.Framework.

It allows any .NET program (VB.NET, C#, etc) to open and save files in all formats supported by the DevIL library. Also it opens them as System.Drawing.Bitmap objects, so that it works optimally with existing code.

As now it supports loading in bmp cut dcx dds ico gif jpg lbm lif mdl pcd pcx pic png pnm psd psp raw sgi tga tif wal act pal and Doom graphics

And saving in : bmp dds jpg pcx png pnm raw sgi tga tif pal

Using it is simple.

As an example you can load/save a picture in a picturebox using (C# and VB.NET):

// C#
System.Drawing.Bitmap bmp = DevIL.DevIL.LoadBitmap(filename);
pictureBox1.Image = bmp;

Dim bmp as System.Drawing.Bitmap
bmp = DevIL.DevIL.LoadBitmap(filename)
pictureBox1.Image = bmp

And you can save the picturebox image using :

// C#
System.Drawing.Bitmap bmp = (System.Drawing.Bitmap)pictureBox1.Image;
DevIL.DevIL.SaveBitmap(filename, bmp);

Dim bmp as System.Drawing.Bitmap
bmp = pictureBox1.Image
C++.NET (Managed C++) Source is included and released under a choice of BSD or LGPL license. You can contact me for additional licensing options if you need them. Binaries are provided in the package, compatible with every version of .NET Framework (from 1.0 to 3.0).
You can download samples for DevIL.NET library. The sample program is a small utility which acts as a viewer and a converter of image files, written in both C# and VB.NET.

I’ve done many tries and it seems the stride in .NET framework for 32bit images is always 4*width. While this can be expected, effectively the stride could have any value. As now the code relies heavily on a predictable stride to optimize memory copies.. please report me any bug (, especially if you think a different stride is in place.


  • March 4th, 2007 : Release Version 1.3
  • July 12th, 2005 : Fixed a minor bug in initialization, uploaded samples
  • August 23th, 2005 : Release Version 1.1
  • December 8th, 2004 : Release Version 1.0


  • Fixed a bad bug when loading non true color images (above all GIFs)
  • Implemented a new LoadBitmapAndScale which allows for the bitmap to be scaled directly in DevIL.NET
  • Started to implement some error handling…
  • note: From version 1.1, DevIL.NET may require ILU.dll to be installed in addition to DevIL.DLL. Since having an additional DLL is always a burden, ILU.dll is loaded dinamically and it’s not required unless the scale/resize feature is used ;)


  • Support for VS2005, .NET Framework 2.0 on x86 platforms
  • NOTE : When using Devil.NET 1.2 on VS2005, remind to set your projects to use the x86 CPU. Otherwise the program may fail to run on x64 platforms.


  • Fixed the infamous vertical flip bug
  • The v-flip can be done both in ILU code or .NET framework (depending on whether ILU.DLL has been loaded or not; you can load ILU.DLL either by loading an image with scale options or through the LoadILU method).
  • A DevIL.NET2.DLL exists. This is a framework 2.0/3.0 only version which is just a bit smaller than the “every” framework version.

Download Library Version 1.3
Download Library Version 1.2
Download Library Version 1.1
Download Library Version 1.0
Download VC++ sources and project
Download C# and VB.NET Samples
View the source online

Powered by
Powered by DevIL