@qrcommunication/gigapdf-lib 0.109.0 → 0.109.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/CHANGELOG.md +18 -0
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/gigapdf.wasm +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,24 @@ project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.109.1] - 2026-06-30
|
|
10
|
+
|
|
11
|
+
### Fixed — image-format documentation accuracy
|
|
12
|
+
|
|
13
|
+
- `addImage`, `replaceImage` and the image **watermark** path already accept the
|
|
14
|
+
full raster set — **PNG, JPEG, WebP, GIF, TIFF and AVIF** — since 0.109 (every
|
|
15
|
+
one routes through the shared `prepare_image` / `embeddable_image` decoders).
|
|
16
|
+
But the core and WASM docstrings, the SDK `replaceImage` docs, and the
|
|
17
|
+
`unsupported image` error messages still claimed **PNG/JPEG only** (or omitted
|
|
18
|
+
TIFF). Corrected every stale claim so the documented capability matches the
|
|
19
|
+
implementation. **No behaviour change** — purely documentation and error-text.
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Regression test `replace_image_accepts_every_raster_format_not_just_png_jpeg`:
|
|
24
|
+
proves `replaceImage` swaps a non-PNG/JPEG raster (WebP) in place while keeping
|
|
25
|
+
the image's object number and every `/Do` reference intact.
|
|
26
|
+
|
|
9
27
|
## [0.109.0] - 2026-06-30
|
|
10
28
|
|
|
11
29
|
### Added — image conversion completeness
|
package/dist/index.cjs
CHANGED
|
@@ -1646,7 +1646,8 @@ var GigaPdfDoc = class {
|
|
|
1646
1646
|
* photo while every reference to it stays intact (ISO 32000-1 §8.9). `index` is
|
|
1647
1647
|
* the **unified element index** of an image on `page`, exactly the `index`
|
|
1648
1648
|
* reported by {@link imageElements} (and accepted by {@link removeElement} /
|
|
1649
|
-
* {@link transformElement}); `data` is
|
|
1649
|
+
* {@link transformElement}); `data` is any raster the engine decodes — PNG,
|
|
1650
|
+
* JPEG, WebP, GIF, TIFF or AVIF (the same set {@link addImage} accepts).
|
|
1650
1651
|
*
|
|
1651
1652
|
* Unlike a delete-then-re-add, the image keeps its object number, **every `/Do`
|
|
1652
1653
|
* placement, and its position / scale / rotation / clip matrix** — only the
|
|
@@ -1657,7 +1658,7 @@ var GigaPdfDoc = class {
|
|
|
1657
1658
|
* drawn into the same box (transform the element first to re-fit it).
|
|
1658
1659
|
*
|
|
1659
1660
|
* Returns `false` if `page`/`index` doesn't resolve to a top-level image, or the
|
|
1660
|
-
* bytes aren't a decodable
|
|
1661
|
+
* bytes aren't a decodable raster.
|
|
1661
1662
|
*/
|
|
1662
1663
|
replaceImage(page, index, data) {
|
|
1663
1664
|
return this.g._withBytes(data, (p, l) => this.ex().gp_replace_image(this.h, page, index, p, l)) === 0;
|