Image module

decode_image

procedure · 1 overloadsince 0.28.0Source

Decodes a PNG, JPEG, QOI, BMP or PNM file in the format it is stored in (the nearest Pixel_Format to it).

decode_image :: (
    data: [] u8,
    max_pixels: s64 = DEFAULT_MAX_PIXELS
) -> (image: Image, ok: bool, error: string)

Decodes a PNG, JPEG, QOI, BMP or PNM file in the format it is stored in (the nearest Pixel_Format to it).

Parameters

data: [] u8
max_pixels: s64

Returns

image: Image
ok: bool
error: string

See also