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