VegaRise.NET
HomeAPI Reference
Back to Image

ExportToFileMethod

Definition

Namespace
DOM.Elements.Graphics
Assembly
DOM.dll

Exports the current image to a file, optionally re-encoding it to a different format.

ExportToFile(string filePath, ImageType imageType, int lossy)

Parameters

filePath
Destination file path.
imageType
Target image format.
lossy
For JPEG, specifies the quality from 0 to 100 (higher is better). Ignored for lossless formats.

Exceptions

  • System.ArgumentException: Thrown when is null or empty. filePath
  • System.InvalidOperationException: Thrown when the image has no content.
  • System.Exception: Thrown when encoding fails.