DevIL.NET

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

VERSION 1.3 RELEASED, with vertical flip bug fixed!!

WHAT IS DEVIL.NET ?

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;

‘ VB.NET
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);

‘ VB.NET
Dim bmp as System.Drawing.Bitmap
bmp = pictureBox1.Image
DevIL.DevIL.SaveBitmap(filename)
LICENSE & VERSION
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).
SAMPLES
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.

RELEASE NOTES
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 (marcoPLEASEDELTHIS@mastropaolo.com), especially if you think a different stride is in place.

UPDATES

VERSION 1.1 CHANGES

VERSION 1.2 CHANGES

VERSION 1.3 CHANGES

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