Method SaveAsJpeg
SaveAsJpeg(string, int)
Saves the image to a JPEG file at the specified path, using the given quality level.
public bool SaveAsJpeg(string filePath, int quality = 90)
Parameters
filePathstringThe file path where to save the JPEG image.
qualityintJPEG quality level, from 0 to 100:
- 0 = lowest quality, smallest file
- 100 = highest quality, largest file
Returns
- bool
True if the image was saved successfully; otherwise, false.
Exceptions
- ObjectDisposedException
Thrown if this instance has been disposed.