web analytics

What image file types can Image.FromFile() load in .NET?


codeling 1573 - 6555
@2019-12-26 21:55:32

In .NET, the method Image.FromFile(string filename) is used to creates an Image from the specified file.

But you have to be aware that Managed GDI+ has built-in encoders and decoders that support the following file types:

  • BMP

  • GIF

  • JPEG

  • PNG

  • TIFF

If the file does not have a valid image format or if GDI+ does not support the pixel format of the file, this method throws an OutOfMemoryException exception.


You must Sign In to comment on this topic.

© 2022 Digcode.com