Path or file URL where the image should be written.
Image to save.
Optional
options: WriteOptionsWrite options.
A promise that resolves when the image is written.
Write an image to the disk as PNG.
When the png
format is specified, the file's extension doesn't matter.
Path or file URL where the image should be written.
Image to save.
Encode options for png images.
A promise that resolves when the image is written.
Write an image to the disk as JPEG.
When the jpeg
format is specified, the file's extension doesn't matter.
Path or file URL where the image should be written.
Image to save.
Encode options for jpeg images.
A promise that resolves when the image is written.
Write an image to the disk as BMP.
When the bmp
format is specified, the file's extension doesn't matter.
Path or file URL where the image should be written.
Image to save.
Optional
options: WriteOptionsBmpEncode options for bmp images.
A promise that resolves when the image is written.
Write an image to the disk. The file format is determined automatically from the file's extension. If the extension is not supported, an error will be thrown.