bhouston/hdrify
关于
Read/write HDR, EXR and UltraHDR JPGs (Gain maps), includes tone mapping and color space support.
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +2
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文HDRify
Read and write EXR, HDR, and Ultra HDR images in pure JavaScript.
- 📦 Pure JavaScript, No Native Bindings
- 🌐 Node.js, Browsers, and Web Workers
- 🗜️ All Major EXR Compressions
- 📸 Adobe and Ultra HDR Gain Maps
- 🎨 Four Built-in Tone Mappers
- 🔷 Full TypeScript Support
HDRify reads and writes HDR (Radiance RGBE), EXR (OpenEXR), and JPEG with gain maps (JPEG-R / Ultra HDR) in pure JavaScript. It has no native bindings and works in Node.js and browsers.
Every reader returns a shared HdrifyImage (float RGBA pixels) and every writer accepts it, so converting between formats is a read followed by a write.
Packages
| Package | Version (click for changelogs) |
|---|---|
| hdrify | |
| hdrify-cli | |
| hdrify-react | |
| hdrify-vscode-extension |
Get started
pnpm add hdrify
Convert an EXR image to Radiance HDR in Node.js:
import { readFileSync, writeFileSync } from 'node:fs';
import { readExr, writeHdr } from 'hdrify';
const image = readExr(readFileSync('input.exr'));
writeFileSync('output.hdr', writeHdr(image));
API reference: readExr · writeHdr · HdrifyImage.
Read and write OpenEXR, Radiance HDR, JPEG XL, and JPEG gain maps with one floating-point RGBA image format. Resize, flip, convert color spaces, or apply ACES, AgX, Khronos Neutral, and Reinhard tone mapping.
Use it where you work
- Browser: Try the live viewer and converter, or follow the code examples.
- React: Add a viewer with hdrify-react and
ImageViewer. - Terminal: Install hdrify-cli and run
hdrify convert input.exr output.jpg. - VS Code and Cursor: Preview and convert HDR images in your editor.
Documentation
Full documentation is available on the HDRify documentation website. See the getting started guide, supported formats, and API reference for more.
Acknowledgements
This project would not have been possible without these projects, which were used as references:
- Three.js - tone mapping, UltraHDR loader, EXR loader, example images.
- Gainmap.js - Ultra HDR loading, saving, XMP metadata structure and JPEG-R assembly (reference implementation).
- OpenEXR - EXR encoding/decoding for all the various compression formats, example images.
Releases
See RELEASING.md for how releases are published and GitHub Releases for changes.
Contribution
See Contributing Guide.
License
MIT
Author
Ben Houston, Sponsored by Land of Assets.
探索相关项目
加载中…