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