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

codeling 1263 - 5394
@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.

Users browsing this topic