You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 147d6cf
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ Upgrading from 3.x? Upgrade to the latest 3.x release first, fix the deprecation
106
106
107
107
-**Invalid choices throw a `TypeError` naming the valid ones**: the resize `mode` (an `Error`, thrown once resizing started, so `resize({ fit: 'cover' })` could move a frame's offsets before failing), `composite()`'s `mode`, `flip()`, `disposalMode` and `wrapStyle` (`RangeError`s; an empty or `null``wrapStyle` was the default).
108
108
109
-
-**No creation time and no version in encoded files by default**: the encoders only write a creation time when `metadata.creationTime` is given, so the same image encodes to the same bytes, and the default software is `'ImageScript'` without the version. `creationTime: null` and `software: null` leave the field out.
109
+
-**No creation time and no version in encoded files by default**: the encoders only write a creation time when `metadata.creationTime` is given, so the same image encodes to the same bytes on one runtime (PNG and APNG compress with the runtime's own zlib, whose output differs between Node.js, Deno, Bun and browsers), and the default software is `'ImageScript'` without the version. `creationTime: null` and `software: null` leave the field out.
110
110
111
111
-**Drawing an SVG image that can't be drawn throws**: an `href` that isn't a data URI or one of the `images`, an image that can't be decoded (with the decoding error as its `cause`), an unsupported data URI type or an embedded SVG that can't be read throw once they are drawn (images in `<defs>` or hidden ones don't); they drew nothing before. A font in the `font` option that can't be read throws too, like in `renderText()` (it was left out); damaged fonts that the SVG embeds with `@font-face` are still left out, as in browsers.
112
112
@@ -170,11 +170,11 @@ Upgrading from 3.x? Upgrade to the latest 3.x release first, fix the deprecation
170
170
- TIFF files that ask for far more memory than they are are refused before anything is allocated: YCbCr subsampling factors other than 1, 2 and 4 (65534x65535 took 4 GB and 5 s for a 32 KB file) and more than 32 samples per pixel (1 GB for 33 KB), and the memory of the YCbCr units counts against `maxPixels`.
171
171
-`Animation.decode()` of an APNG or WebP composites each frame as it is decoded, so its peak memory is 1.3 times the result instead of 2.2 (all decoded frames were held next to the composited ones); GIFs let go of each frame's color indices once it is composited (1.45 times, now 1.2).
172
172
-`renderSVG()` bounds the work of strokes with round joins: a join was a whole circle of up to 256 points at every vertex of a flattened curve, so a 17 KB path took 9 s and 1 GB and a 50 KB one 2.7 GB (now a wedge on the outer side, 1.6 s and 220 MB, and 0.3 s and 350 MB). Round joins differ from the circles by at most 5 of 255 on the edge pixels. Shapes whose edges cross the rows of the image more than 2^27 times (thousands of huge overlapping strokes took 38 s from 51 KB of SVG) throw a `LimitError`.
173
-
- Bundlers drop the parts of the library a page doesn't use: the build's `dist/package.json` declared only `"type": "module"`, which hid the `"sideEffects": false` of the package from them, so `import { Colors }` bundled the whole library (201 kB minified, now 3.4 kB).
173
+
- Bundlers drop the parts of the library a page doesn't use: the build's `dist/package.json` declared only `"type": "module"`, which hid the `"sideEffects": false` of the package from them, so `import { Colors }` bundled the whole library (201 kB minified, now about 4 kB).
174
174
-`renderSVG()` rasterizes shapes with many edges in near linear time: the edges that start in a row were inserted one by one into the sorted active ones, so text of 20000 glyphs took 15 s (now 0.4 s) and 8000 random curves 18 s (now 2.3 s).
175
175
-`renderSVG()` keeps the memory of dashed strokes bounded: dashes beside the image are left out and the others are stroked a batch at a time, so a line of a million dashes (157 bytes of SVG) no longer takes 650 MB. The rasterizer also keeps one sub-scanline's crossings at a time instead of 16.
176
176
- AVIF 4:2:0 images of an odd width decode the last column like libavif: it took the chroma of the column to its left too (off by up to 51).
177
-
-`Animation.decode()` counts every frame as at least 1024 pixels of `maxPixels`: a frame takes memory however small it is, so a 4.6 MB GIF of 200000 frames of 1x1 took 720 MB.
177
+
-`Animation.decode()` counts every frame as at least 1024 pixels of `maxPixels`, while the frames are decoded: a frame takes memory however small it is (a 4.6 MB GIF of 200000 frames of 1x1 took 720 MB, and 1000000 such frames 1.8 GB and 77 s), so the default limit allows about 262000 frames.
178
178
-`renderSVG()` bounds the work of markers: their elements count against the 100,000 elements of `<use>` references, and one render draws at most 10,000 markers (120,000 vertices with `marker-mid` took 135 s).
179
179
-`renderSVG()` bounds the work of filters: their primitives may work on 2^25 pixels plus 16 per pixel of the output in one render (once per pass: an `feConvolveMatrix` per 9 taps of its kernel, an `feTurbulence` per octave, an `feMerge` per node), more throws a `LimitError`; a filter's region counts against `maxLayerPixels` like the other layers (one of more than 2^26 pixels was left out without a word) (600 blurs and morphologies over a megapixel, 37 KB of SVG, took more than 3 GB and minutes), and the results a filter keeps for `result=` references count against `maxLayerPixels`.
180
180
-`renderSVG()` parses `transform` lists in linear time: a long list of unclosed functions took 4.8 s at 280 KB.
0 commit comments