Method SaveAsPng
SaveAsPng(string, int)
Saves the image to a PNG file at the specified path, using the given compression level.
public bool SaveAsPng(string filePath, int compressionLevel = 6)Parameters
- filePathstring
- The file path where to save the PNG image. 
- compressionLevelint
- Zlib deflate compression level, from 0 to 9: - 0 = no compression (fastest write, largest file)
- 9 = maximum compression (slowest write, smallest file)
 
Returns
- bool
- True if the image was saved successfully; otherwise, false. 
Exceptions
- ObjectDisposedException
- Thrown if this instance has been disposed.