C# image library(DDS,TGA,PSD supported)
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.
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 pnmpsd 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
- 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
VERSION 1.1 CHANGES
- 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
VERSION 1.2 CHANGES
- 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.
VERSION 1.3 CHANGES
- 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
'Programming > C#' 카테고리의 다른 글
[Bug] 추가 정보: 지정된 모듈을 찾을 수 없습니다. (예외가 발생한 HRESULT: 0x8007007E) (0) | 2012.03.08 |
---|---|
[Bug] 프로그램을 잘못된 형식으로 로드하려고 했습니다. (예외가 발생한 HRESULT: 0x8007000B) (10) | 2012.03.08 |
〃C# DirectX.AudioVideoPlayback를 이용한 음성파일 재생 (0) | 2012.03.04 |
C#에서 DirectX를 활용하여 Wave파일 재생하기 (0) | 2012.03.04 |
datagridview에 엔터키치면 오른쪽 셀 이동 (1) | 2012.02.22 |