KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way to find out what the ContentType of an image is from only the original bytes? At the moment I have a database column that stores only the byte[], which I use to display an image on a web page. MemoryStream ms = new MemoryStream(imageBytes); Image image = Image.FromStream(ms); image.Save(context.HttpContext.Response.OutputStream, <--ContentType-->); I could of course just save the ContentType in another column in the table, but just wondered if there was another way e.g. maybe .Net has a way to interrogate the data to get the type.
Tags (comma-separated)
Save Edits
Cancel