@bb-studio/exr 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 promto-c
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # @bb-studio/exr
2
+
3
+ Production-grade OpenEXR scanline parser/decoder for browser and Node.js.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @bb-studio/exr
9
+ ```
10
+
11
+ ## Core API
12
+
13
+ ```ts
14
+ import { parseExr, decodeExrPart, readExr, writeExr } from '@bb-studio/exr';
15
+
16
+ const buffer = await fetch('/image.exr').then((r) => r.arrayBuffer());
17
+ const structure = parseExr(buffer);
18
+ const decoded = decodeExrPart(buffer, structure, { partId: structure.parts[0].id });
19
+
20
+ // Convenience parse+decode in one call
21
+ const result = readExr(buffer);
22
+
23
+ // Encode scanline EXR
24
+ const encoded = writeExr({
25
+ parts: [
26
+ {
27
+ compression: 3, // ZIP
28
+ dataWindow: { xMin: 0, yMin: 0, xMax: 1, yMax: 1 },
29
+ channels: [{ name: 'R', pixelType: 2, data: new Float32Array([0, 1, 2, 3]) }],
30
+ },
31
+ ],
32
+ });
33
+ ```
34
+
35
+ `decodeExrPart` returns sampled-native channel planes with sampling metadata.
36
+
37
+ ## Browser Worker Helpers
38
+
39
+ ```ts
40
+ import {
41
+ decodeExrPartWithWorkers,
42
+ expandDecodedPartChannels,
43
+ } from '@bb-studio/exr/browser';
44
+ ```
45
+
46
+ - `decodeExrPartWithWorkers` optionally pre-decodes ZIP/DWA chunks using workers.
47
+ - `expandDecodedPartChannels` converts sampled channels into full-resolution planes.
48
+
49
+ ## Error/Diagnostics
50
+
51
+ - Typed failures via `ExrError` and `ExrErrorCode`.
52
+ - Structured progress events via `onEvent` callbacks (`ExrEvent`, `ExrEventCode`).
53
+
54
+ ## Writer Support
55
+
56
+ - Scanline single-part and multipart writing.
57
+ - Compression: `NO_COMPRESSION`, `RLE_COMPRESSION`, `ZIPS_COMPRESSION`, `ZIP_COMPRESSION`, `PIZ_COMPRESSION`, `PXR24_COMPRESSION`, `B44_COMPRESSION`, `B44A_COMPRESSION`.
58
+ - Pixel types: `UINT`, `HALF`, `FLOAT`.
59
+
60
+ ## License
61
+
62
+ - Package license: MIT ([`LICENSE`](./LICENSE))
63
+ - Third-party dependency notices: [`THIRD_PARTY_LICENSES.md`](./THIRD_PARTY_LICENSES.md)
@@ -0,0 +1,32 @@
1
+ # Third-Party Licenses for @bb-studio/exr
2
+
3
+ The `@bb-studio/exr` package includes the following third-party dependency:
4
+
5
+ ## fflate
6
+
7
+ - Version: `0.8.2`
8
+ - License: `MIT`
9
+ - Repository: <https://github.com/101arrowz/fflate>
10
+ - Source license file: `node_modules/fflate/LICENSE`
11
+
12
+ ### MIT License (fflate)
13
+
14
+ Copyright (c) 2023 Arjun Barrett
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a copy
17
+ of this software and associated documentation files (the "Software"), to deal
18
+ in the Software without restriction, including without limitation the rights
19
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
+ copies of the Software, and to permit persons to whom the Software is
21
+ furnished to do so, subject to the following conditions:
22
+
23
+ The above copyright notice and this permission notice shall be included in all
24
+ copies or substantial portions of the Software.
25
+
26
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
+ SOFTWARE.