views:

28

answers:

3

Hi,

Given the line:

Bitmap bitmap = new Bitmap(stream);

where stream is a System.IO.Stream, are there any limitations on the image file type e.g png, jpg, gif etc that can be handled. i.e are all image file/stream header info clear enough to say "I am an image".

I haven't run into any yet, but have only being using the pretty standard ones so far.

Thanks

A: 

It should work for all image formats for which the OS has a codec available.

Thomas Levesque
+1  A: 

Here is an overview of what is supported: http://msdn.microsoft.com/en-us/library/at62haz6.aspx

All the file types mentioned there are GDI+ which are supported by the .NET framework

Jasper
+1  A: 

I'm almost certain it's the same set as supported by the Bitmap(string) constructor: BMP, GIF, EXIF, JPG, PNG and TIFF.

Reference

Foole
Thanks for your answer. Both yours and @jasper's refs got me the answer I wanted so I went to who got there first. :-( But cheers and a +1 anyway
David Archer