Parameters
- filename
- A string that contains the name of the file to which to save image.
Exception | Description |
---|---|
System.ArgumentNullException | Thrown if filename is null. |
Supported image formats: BMP, GIF, JPEG, PDF, PNG, TIFF, multipage TIFF.
Suitable encoder will be selected automatically by using the extension of the filename.
PngEncoder object will be used for saving image if the suitable encoder will not be found by using the extension of the filename.
The image cannot be saved to the file from which it was loaded.
This method always will create a new TIFF file.
Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5