I'm new hire here,I've SQL database with bunch of tables. one specific table with 40-45 columns have a bitmap column with gigantic string(one single value in a cell). I have a scenario to convert this bitmap data and see what actually it contains (its not a valid image for sure). I browse many byte[]-array related articles available online but so far no help. Is there any way I can do this problem with WinForm or Console App as I don't have the complete or any part of the solution/project. I just have sql database.
public byte[] imageToByteArray(System.Drawing.Image imageIn)
{
MemoryStream ms = new MemoryStream();
imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
return ms.ToArray();
}
public Image byteArrayToImage(byte[] byteArrayIn)
{
MemoryStream ms = new MemoryStream(byteArrayIn);
Image returnImage = Image.FromStream(ms);
return returnImage;
}
Also, It's a TIFF image document with a "Add Stamp" script/configuration,how to see this bitmap data? and how to interpret the stamp/functionality part from this?
Read all this and many other resources. Using .NET, how can you find the mime type of a file based on the file signature not the extension
http://www.mikesdotnetting.com/Article/87/iTextSharp-Working-with-images