As to the removed data on the image types, we have a very optimistic proverb: "It's too late to start drinking mineral water when you have a kidney failure". Where have you been before? (Let me guess: not in this company?
I'm afraid that someone will have a nice comfortable job of remembering what image type could have been possibly stored in the past, trying to look at the first byte to figure out the image types and using the most effective trial-and-error method of restoring of this sacral knowledge. To some extend, you can automate this intricate work by writing some method which would sequentially try to load the image as different formats until if does not fail.
But, on more serious note: if you just stored the full content of some image files in the database in full, the beginning of the file contains metadata
helping to load it properly.
Technically, it's pretty simple thing: you can use the
class and create the instance with the constructor with a
You will read the blob data from your database as an array of bytes, using ADO.NET data reader
. Please see this short tutorial:
The raw data in the form of byte array use used to initialize memory stream
This really short CodeProject article shows the sample code for it: C# Image to Byte Array and Byte Array to Image Converter Class