Live Chat Icon For mobile
Live Chat Icon

How can I check the image raw format i.e how can I find if Image.RawFormat property returns a ‘jpeg’ or ‘gif’,

Platform: ASP.NET| Category: GDI+

VB.NET

if (Img.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Jpeg)) then
     	Response.ContentType = 'image/jpeg'
Else 
..
End if

C#

if (Img.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Jpeg)) 
{
    	Response.ContentType = 'image/jpeg'
}
else 
{
..
}

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.