ImageDecoder
Platform-supplied image decoder. KitePDF's core stays pure-Kotlin-stdlib; actual JPEG / PNG / etc. decoding rides on whatever the host platform already provides — Skia on Desktop, the OS framework on Android / iOS, createImageBitmap on JS.
The actual implementations live in :kitepdf-compose's platform source sets. If a platform can't decode the bytes (corrupt JPEG, unsupported format), the actual returns null and the renderer paints a placeholder rectangle.
Functions
Compose/JS rides on Skiko (CanvasKit), which bundles Skia's image codecs — so decoding is synchronous here too, no createImageBitmap Promise dance. Falls back to null (→ placeholder rectangle) if Skia can't parse the bytes.
Raw pixels are synchronous, so Skiko (which Compose/JS rides on) can build the bitmap directly.