fromEncodedImage
Build an image from a self-contained encoded file, as shipped by EPUB / CBZ / SVG <image> (rather than pulled from a PDF /XObject stream). The format and pixel dimensions are sniffed from the bytes.
PNG, GIF, BMP, JPEG and JPEG 2000 are decoded in pure Kotlin by the shared KiteImage engine into a Kind.RAW image that renders on every backend. A JPEG the native decoder can't handle (arithmetic coding, 12-bit) falls back to the host platform's loader (Kind.JPEG with the file in encodedBytes). Unrecognised formats return null, so callers degrade gracefully by skipping the image.