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

Latest commit

 

History

History
59 lines (41 loc) · 1.37 KB

README.md

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