Writes bitmap to an image file. Returns false for any other extension, for a bitmap that is not RGB8 or RGBA8, or when the write fails.
- filepath: where to write. The extension picks the format:
.png,.bmp,.tga,.jpgor.jpeg. - save_alpha: keeps the alpha channel of an
RGBA8bitmap. Off by default, which writes RGB.
bitmap_save :: (bitmap: *Bitmap, filepath: string, save_alpha := false) -> bool
Writes bitmap to an image file. Returns false for any other extension, for a bitmap that is not RGB8 or RGBA8, or when the write fails.
Parameters
- bitmap: *Bitmap
- filepath: string
- where to write. The extension picks the format:
.png,.bmp,.tga,.jpgor.jpeg. - save_alpha := false
- keeps the alpha channel of an
RGBA8bitmap. Off by default, which writes RGB.
Returns
- bool