@browser-mc/browser-image-resizer-ex 0.5.0 → 0.5.1
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/README.md +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -101,10 +101,10 @@ console.log(result.blob);
|
|
|
101
101
|
|
|
102
102
|
## Notes
|
|
103
103
|
|
|
104
|
-
- Resizing automatically uses raw planar resize for HDR-like formats when `VideoFrame.copyTo()` exposes a supported planar format
|
|
104
|
+
- Resizing automatically uses raw planar resize for HDR-like formats when `VideoFrame.copyTo()` exposes a supported planar format or `NV12`, and otherwise uses Canvas.
|
|
105
105
|
- `colorMetadata: 'preserve'` is the default. Use `colorMetadata: 'canvas-sdr'` to draw through an sRGB Canvas path and mark the output frame as BT.709 SDR.
|
|
106
106
|
- With `colorMetadata: 'preserve'`, `resizeAndConvertImage` reads source container color metadata through `@browser-mc/media-container` and preserves it when the resize and encode path does not require Canvas color conversion. AVIF `colr/nclx` CICP metadata and AVIF/JPEG/WebP ICC profiles are carried through to compatible AVIF outputs. Explicit `avif.colorMetadata`, `avif.color`, and `avif.colorSpace` options still take precedence for AVIF output. JPEG/WebP output is encoded through Canvas, so source ICC profiles are not reattached after Canvas conversion.
|
|
107
|
-
- `rawBitDepth` and `rawChromaSubsampling` are optional raw planar conversion controls. Use `8`, `10`, or `12` for bit depth, and `444`, `422`, or `420` for chroma. `preserve` is the default for both. These options affect supported raw planar `VideoFrame`s before encoding. For AVIF output, `rawChromaSubsampling: '420'` or `'444'` is also used as the encoder chroma default unless `avif.chromaSubsampling` is set explicitly.
|
|
107
|
+
- `rawBitDepth` and `rawChromaSubsampling` are optional raw planar conversion controls. Use `8`, `10`, or `12` for bit depth, and `444`, `422`, or `420` for chroma. `preserve` is the default for both. These options affect supported raw planar `VideoFrame`s before encoding; `NV12` can be preserved during resize or unpacked to `I420` when raw planar conversion is requested. For AVIF output, `rawChromaSubsampling: '420'` or `'444'` is also used as the encoder chroma default unless `avif.chromaSubsampling` is set explicitly.
|
|
108
108
|
- Chromium may support 8-bit AVIF encoding while rejecting the matching 10-bit AV1 codec for high-bit-depth frames. When AVIF output is requested and `avif.codec` is not set, `resizeAndConvertImage` checks the 10-bit and 8-bit encoder configs for high-bit-depth planar frames. If 10-bit is unavailable but 8-bit is available, supported planar frames are converted to 8-bit before encoding and an 8-bit AV1 codec is passed explicitly. A warning is added when this implicit 8-bit fallback changes the frame bit depth.
|
|
109
109
|
- JPEG/WebP encoding currently goes through `OffscreenCanvas.convertToBlob()`, so strict HDR preservation is not expected there.
|
|
110
110
|
- Animated WebP currently writes full-canvas frames and does not yet optimize changed rectangles.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browser-mc/browser-image-resizer-ex",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@browser-mc/media-container": "^0.3.0",
|
|
20
19
|
"@browser-mc/binary": "^0.0.1",
|
|
21
|
-
"@browser-mc/
|
|
20
|
+
"@browser-mc/media-container": "^0.3.0",
|
|
21
|
+
"@browser-mc/webcodecs-avif": "^0.4.1",
|
|
22
22
|
"@browser-mc/exif-transplant": "^0.0.3",
|
|
23
|
-
"@browser-mc/webcodecs-
|
|
23
|
+
"@browser-mc/webcodecs-color": "^0.1.1"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|