There is mini-codecs collections...
Image Decoders
📷 JNG (JPEG Network Graphics) 📷
Based on pure JavaScript, uses native browser-decoders.
About
Features
- Color and gamma correction
- Using OffscreenCanvas
- Alpha channel support
- No plugins required
- Uses browser-native PNG and JPEG
- Support HTML5 Canvas HDR
API?
import { JNG } from "/coder/index.mjs"; const $img = document.querySelector("#jng"); $img.src = URL.createObjectURL(await (new JNG().load($img.src).asPNG()));
📷 JXL (JPEG XL) 📷
Based on WebAssembly compilation.
About
Features
- Conversion to PNG 16-bit directly
- Using WebAssembly and Emscripten
- Import ICC profile to PNG format
- Animation support
API?
import {loadJXL} from "/coder/index.mjs"; const $img = document.querySelector("#jxl"); $img.src = URL.createObjectURL(new Blob([await loadJXL($img.src)], {type: 'image/png'}));