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
filePath
stringThe file path where to save the PNG image.
compressionLevel
intZlib 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.