ToImage

public static Image ToImage(this byte[] bytes)
{
	if(bytes == null)
		throw new ArgumentNullException("bytes");

	return Image.FromStream(new MemoryStream(bytes));
}
Example:
byte[] imageBytes = GetImageBytesFromDB();
Image myImage = imageBytes.ToImage();

Description

Create a new Image from a byte array

Details

Double click on the code to select all.

 

;