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

There is mini-codecs collections...

License

Notifications You must be signed in to change notification settings

scrapjs/MCoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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