I\'ve got a byte array for an image (stored in the database). I want to create an Image object, create several Images of different sizes and store them back in the database (sa
I thought I'd add this as an answer to make it more visible.
With saving it back to a byte array:
public Image localImage;
public byte[] ImageBytes;
public FUU_Image(byte[] bytes)
{
using (MemoryStream ImageStream = new System.IO.MemoryStream(bytes))
{
localImage = Image.FromStream(ImageStream);
}
localImage = ResizeImage(localImage);
using (MemoryStream ImageStreamOut = new MemoryStream())
{
localImage.Save(ImageStreamOut, ImageFormat.Jpeg);
ImageBytes = ImageStreamOut.ToArray();
}
}