Skip to content

Commit 4b50b58

Browse files
committed
2.2.0
1 parent 5fb973f commit 4b50b58

File tree

16 files changed

+65
-16
lines changed

16 files changed

+65
-16
lines changed

CHANGELOG.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,54 @@ This changelog also contains important changes in dependencies.
99

1010
## [Unreleased]
1111

12+
## [2.2.0] - 2022-11-17
13+
14+
Now resvg-js can be run natively (not Wasm) directly in Deno, this allows to get close to the performance of Node.js native addons in Deno.
15+
16+
```shell
17+
deno run --unstable --allow-read --allow-write --allow-ffi example/index-deno.js
18+
```
19+
20+
See [Deno Example](example/index-deno.js)
21+
22+
```js
23+
import * as path from 'https://deno.land/[email protected]/path/mod.ts'
24+
import { Resvg } from 'npm:@resvg/resvg-js'
25+
const __dirname = path.dirname(path.fromFileUrl(import.meta.url))
26+
27+
const svg = await Deno.readFile(path.join(__dirname, './text.svg'))
28+
const resvg = new Resvg(svg, opts)
29+
const pngData = resvg.render()
30+
const pngBuffer = pngData.asPng()
31+
32+
await Deno.writeFile(path.join(__dirname, './text-out-deno.png'), pngBuffer)
33+
```
34+
35+
In addition, resvg-js can return the raw pixels data of the PNG, which can be very convenient for scenes where only pixels need to be processed.
36+
37+
### Added
38+
39+
- feat: add `.pixels()` API for returning PNG pixels data (#123).
40+
- chore: upgrade to resvg v0.25.0 (#156).
41+
- Partial `paint-order` attribute support. Markers can only be under or above the shape.
42+
- CSS3 `writing-mode` variants `vertical-rl` and `vertical-lr`. Thanks to @yisibl.
43+
- (tiny-skia) AArch64 Neon SIMD support. Up to 3x faster on Apple M1.
44+
- Path bbox calculation scales stroke width too. Thanks to @growler.
45+
- (tiny-skia) Round caps roundness. Fixes #155.
46+
47+
### Changed
48+
49+
- doc: the `dpi` option is not the DPI in the PNG file. (#146)
50+
- chore: add deno example and docs. (#154)
51+
- feat: upgrade napi-rs to 2.10.0 and Node.js v18. (#157)
52+
- test: add image resolver API test case. (#164)
53+
- feat: remove the `infer` crate, this can reduce the size of Wasm files. (#165)
54+
- feat: error code UnrecognizedBuffer changed to UnsupportedImage. (#165)
55+
56+
### Fixed
57+
58+
- fix: ignore `png` crate in `renovate.json`. (#161)
59+
1260
## [2.1.0] - 2022-07-03
1361
1462
### Added
@@ -373,7 +421,8 @@ The first official version, use [resvg 0.18.0](https://github.com/RazrFalcon/res
373421
- Support custom fonts and system fonts.
374422
- Supports setting the background color of PNG.
375423
376-
[unreleased]: https://github.com/yisibl/resvg-js/compare/v2.1.0...HEAD
424+
[unreleased]: https://github.com/yisibl/resvg-js/compare/v2.2.0...HEAD
425+
[2.2.0]: https://github.com/yisibl/resvg-js/compare/v2.1.0...v2.2.0
377426
[2.1.0]: https://github.com/yisibl/resvg-js/compare/v2.0.1...v2.1.0
378427
[2.0.1]: https://github.com/yisibl/resvg-js/compare/v2.0.0...v2.0.1
379428
[2.0.0]: https://github.com/yisibl/resvg-js/compare/v2.0.0-beta.0...v2.0.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ console.info('✨ Done in', performance.now() - t, 'ms')
133133

134134
await Deno.writeFile(path.join(__dirname, './text-out-deno.png'), pngBuffer)
135135
```
136+
136137
### WebAssembly
137138
138139
This package also ships a pure WebAssembly artifact built with `wasm-bindgen` to run in browsers.
@@ -164,7 +165,6 @@ This package also ships a pure WebAssembly artifact built with `wasm-bindgen` to
164165
165166
See [playground](playground/index.html), it is also possible to [call Wasm in Node.js](example/wasm-node.js), but it is slower.
166167
167-
168168
## Sample Benchmark
169169
170170
```shell

npm/android-arm-eabi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-android-arm-eabi",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"android"
66
],

npm/android-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-android-arm64",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"android"
66
],

npm/darwin-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-darwin-arm64",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"darwin"
66
],

npm/darwin-x64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-darwin-x64",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"darwin"
66
],

npm/linux-arm-gnueabihf/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-linux-arm-gnueabihf",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"linux"
66
],

npm/linux-arm64-gnu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-linux-arm64-gnu",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"linux"
66
],

npm/linux-arm64-musl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-linux-arm64-musl",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"linux"
66
],

npm/linux-x64-gnu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-linux-x64-gnu",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"linux"
66
],

npm/linux-x64-musl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-linux-x64-musl",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"linux"
66
],

npm/win32-arm64-msvc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-win32-arm64-msvc",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"win32"
66
],

npm/win32-ia32-msvc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-win32-ia32-msvc",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"win32"
66
],

npm/win32-x64-msvc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js-win32-x64-msvc",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"os": [
55
"win32"
66
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-js",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "A high-performance SVG renderer and toolkit, powered by Rust based resvg and napi-rs",
55
"main": "index.js",
66
"repository": "[email protected]:yisibl/resvg-js.git",

wasm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@resvg/resvg-wasm",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "A high-performance SVG renderer and toolkit, powered by Rust based resvg and napi-rs",
55
"main": "index.js",
66
"module": "index.mjs",

0 commit comments

Comments
 (0)