Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

parse-exr

dmnsgn32MIT1.0.1TypeScript support: included

EXR file parser. Ported from Three.js implementation without depending on it.

exr, parser, webgl

readme

parse-exr

npm version stability-stable npm minzipped size dependencies types Conventional Commits styled with prettier linted with eslint license

EXR file parser. Ported from Three.js implementation without depending on it.

paypal coinbase twitter

Installation

npm install parse-exr

Usage

import parseExr from "parse-exr";

const exrData = await (await fetch(url)).arrayBuffer();

const FloatType = 1015;
// const HalfFloatType = 1016;
const { data, width, height } = parseExr(exrData, FloatType);

// => Use the data

API

Functions

parseExr(buffer, [type])EXRData

Parse a buffer and return EXR data

Typedefs

EXRData

parseExr(buffer, [type]) ⇒ EXRData

Parse a buffer and return EXR data

Kind: global function

Param Type Default Description
buffer ArrayBuffer |
[type] 1015 | 1016 1016 Float (1015) or Half Float (1016)

EXRData

Kind: global typedef Properties

Name Type
header object
width number
height number
data Uint16Array | Float32Array
format 1023 | 1028
colorSpace "" | srgb-linear

License

MIT. See license file.

changelog

Changelog

All notable changes to this project will be documented in this file. See commit-and-tag-version for commit guidelines.

1.0.1 (2024-07-06)

1.0.0 (2024-05-24)