Simp module

bitmap_load

procedure · 1 overloadSource

Reads an image file into bitmap. Returns false when the file is missing or is not an image.

The bitmap comes out as R8, RG8, RGB8 or RGBA8, whichever matches the channels in the file.

bitmap_load :: (bitmap: *Bitmap, filepath: string) -> bool

Reads an image file into bitmap. Returns false when the file is missing or is not an image.

The bitmap comes out as R8, RG8, RGB8 or RGBA8, whichever matches the channels in the file.

Parameters

bitmap: *Bitmap
receives the pixels. Free them with deinit.
filepath: string
an image file in a format stb_image reads, such as PNG or JPEG.

Returns

bool

See also