Skip to content

Type Alias: ExportFormat ​

ts
type ExportFormat = "png" | "jpeg";

Image format used by all raster export commands (toBase64, toFile, saveToPhotoLibrary).

  • png produces a lossless image with alpha. On iOS the background is always transparent; on Android a non-transparent backgroundColor is part of the image.
  • jpeg produces a smaller lossy image. JPEG has no alpha so the canvas backgroundColor (or white if transparent) is composited beneath the ink before encoding.

Released under the MIT License.