1.0.1 • Published 12 months ago

parse-exr v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

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

Typedefs

parseExr(buffer, type) ⇒ EXRData

Parse a buffer and return EXR data

Kind: global function

ParamTypeDefaultDescription
bufferArrayBuffer
type1015 | 10161016Float (1015) or Half Float (1016)

EXRData

Kind: global typedef Properties

NameType
headerobject
widthnumber
heightnumber
dataUint16Array | Float32Array
format1023 | 1028
colorSpace"" | srgb-linear

License

MIT. See license file.

1.0.1

12 months ago

1.0.0

1 year ago