Now i'm using .net for the conecction with database(sql server 2008), there the images of all product has saved in a attribute type "Image" and in c# get the data in type byte[]. I searched for a answer, but the only solution for this, is this code, but it dont function maybe the type of data is deprecated in the news versions of c#, i dont know.
using static System.Net.Mime.MediaTypeNames;
using System.IO;
public static Image ImageFromByteArray(byte[] bytes)
{
using (MemoryStream ms = new MemoryStream(bytes))
using (Image image = Image.FromStream(ms, true, true))
{
return (Image)image.Clone();
}
}