Skip to content
This repository was archived by the owner on Dec 24, 2023. It is now read-only.

Latest commit

聽

History

History
59 lines (41 loc) 路 1.37 KB

File metadata and controls

59 lines (41 loc) 路 1.37 KB

馃摎 MCoder 馃摎

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'}));