Parameters
- filename
- The name of the image file.
- readOnlyMode
- A value indicating whether the file should be opened in readonly mode.
Supported image formats: BMP, DICOM, DOCX, XLSX, EMF, GIF, Icon, JBIG2, JPEG, JPEG-LS, JPEG2000, PCX, PDF, PNG, RAW, TIFF, WMF.
This C#/VB.NET code shows how to load image from file (file will be opened in read only mode, file stream will be closed when image is disposed).
Target Platforms: .NET 11; .NET 10; .NET 9; .NET 8; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5