Image Handling for Noobies

G

Guest

From a server process (no display access) I would like to take an image (most
likely GIF or JPG) as a blob from a DB and rummage around the pixel values.
Are there classes in the .NET framework that will enable me to decode an
image blob like this?

What classes should I look at for handling images on a pixel-bytes / color
table kind of level?

Thanks.
 
M

Morten Wennevik

Hi,

Not sure what you mean by image blob, but you can retrieve raw byte data from a DB, feed it into a MemoryStream and create an Bitmap using Image.FromStream.

You can use Bitmap.GetPixel/SetPixel to access individual pixels, or if performance is an issue, read up on Bitmap.LockBits and 'unsafe' code blocks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top