Howdy,
I haven't written any code yet, but I've encountered a similar problem before. Hopefully things have changed since the last time I visited it.
I'm trying to do my own image conversion for games into a special OpenGL image format.
In order to perform the conversion correctly, I need all pixel data and more importantly, i need all the alpha channel data (all 8bits per pixel).
Does the System.Drawing.dll in .NET support full 32-bit alpha transperency loading?
Will I be able to walk the alpha channel with all information retained in C#?
-
Yes, it does. You should get an image with PixelFormat set to Format32bppArgb, then when you call LockBits, you can get to the data with the Scan0 property of the returned BitmapData object.
From Lou Franco -
System.Drawing supports any image formate GDI+ does (PNG-32 included), and getting that information is possible.
Look in to System.Drawing.Bitmap.GetPixel or LockBits
From PlacidBox
0 comments:
Post a Comment