블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-19 00:04

'DevIL.NET'에 해당되는 글 1건

  1. 2012.03.08 C# image library(DDS,TGA,PSD supported)

Library File :




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

반응형
Posted by blueasa
, |