Load image as sRGB
Glue code for a few libraries that correctly loads a JPEG, PNG, or (optionally) WebP or 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 (use imgref for convenient manipulation).
The load_image function doesn't panic, but if you enable the mozjpeg feature, it will depend on unwinding internally, and won't be compatible with crates compiled with panic = "abort" option.