Load image as sRGB
Glue code for a few libraries that correctly loads a JPEG, PNG, or (optionally) AVIF image into memory, taking into accout color profile metadata in PNG chunks, EXIF data and app markers. Converts CMYK to RGB if needed.
The returned Image is:
}
The bitmap is packed, so x + y * width gives the pixel at x,y.
The load_image function doesn't panic, but it uses unwinding internally. Error handling won't work in crates compiled with the panic = "abort" option.