Method SaveAsJpegBytes
SaveAsJpegBytes(int)
Saves the image as JPEG to a byte array without writing to disk.
public byte[] SaveAsJpegBytes(int quality = 90)
Parameters
qualityintJPEG quality level (0 to 100). Default is 90.
Returns
- byte[]
A byte array containing the JPEG-encoded image data.
Exceptions
- ObjectDisposedException
Thrown if this instance has been disposed.
- InvalidOperationException
Thrown if encoding fails.