open-ultrahdr
v0.2.0
Published
UltraHDR (ISO 21496-1) gain map support for JavaScript/TypeScript, backed by upstream libultrahdr
Downloads
45
Maintainers
Readme
Open UltraHDR
TypeScript/JavaScript library for UltraHDR (ISO 21496-1) gain map support.
See the main README for full documentation.
Installation
npm install open-ultrahdrQuick Start
import { isUltraHdr, extractSdrBase, setLocation } from 'open-ultrahdr';
// Set WASM file location
setLocation('/assets/wasm/');
// Check if image is UltraHDR
const buffer = await file.arrayBuffer();
if (await isUltraHdr(buffer)) {
const sdrBuffer = await extractSdrBase(buffer);
// Use sdrBuffer for display on non-HDR screens
}License
Dual-licensed under Apache-2.0 OR MIT, matching upstream
libultrahdr.
See the project root LICENSE for details.
