Table of Contents

Method SaveAsJpeg

Namespace
LMKit.Media.Image
Assembly
LM-Kit.NET.dll

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

filePath string

The file path where to save the JPEG image.

quality int

JPEG quality level, from 0 to 100:

  • 0 = lowest quality, smallest file
  • 100 = highest quality, largest file
Default is 90, which offers a good balance between quality and file size.

Returns

bool

True if the image was saved successfully; otherwise, false.

Exceptions

ObjectDisposedException

Thrown if this instance has been disposed.