I am loading the binary bytes of the image file hard drive and loading it into a Bitmap object. How do i find the image type[JPEG, PNG, BMP etc] from the Bitmap object?
If you want to know the format of an image, you can load the file with the Image class, and check its RawFormat property:
using(Image img = Image.FromFile(@"C:\path\to\img.jpg")) { if (img.RawFormat.Equals(System.Drawing.Imaging.ImageFormat.Jpeg)) { // ... } }