tags:

views:

533

answers:

2

I need to detect Image format to save a image like image1.jpg, image2.gif, but i only have a stream, and i do not know the image format(gif, jpeg, png, etc)

Is there a way to detect imageformat from a stream?

+2  A: 

Use Image.FromStream to load the image, then you can see what the Image.RawFormat is.

configurator