@napi-rs/canvas
1.1.0 · 30 Oct 2026MIT47.9M / weekRepositoryHomepagenpmAtom feed
125 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
0.1.64
25 Nov 2024Missing icudtl.dat on Windows
0.1.63
23 Nov 2024Panic when restore from scale(0,0) state
shadowBlur position
Shadow blur 0 makes text shadow not render at all
What's Changed
Panic when restore from scale(0,0) state
shadowBlur position
Shadow blur 0 makes text shadow not render at all
Add riscv64gc-unknown-linux-gnu
0.1.62
15 Nov 2024Allow set file path as Image#src
Support data url as Image#src
Align the imageSmoothingQuality behavior with chrome
What's Changed
Allow set file path as Image#src
Support data url as Image#src
Align the imageSmoothingQuality behavior with chrome
0.1.61
13 Nov 2024After clearing, the
bitmapshould be cleared, and thewidthandheightshould be reset to the initial values.
0.1.60
7 Nov 2024SvgCanvas: Allow canvas size modification
Upgrade to NAPI-RS 3.0.0-alpha.19
Memory leak in Image
What's Changed
SvgCanvas: Allow canvas size modification
Upgrade to NAPI-RS 3.0.0-alpha.19
Memory leak in Image
Svg context
0.1.59
27 Oct 2024Build macos with xcode llvm
loadImage convert ArrayBuffer issue
Upgrade skia to m131
What's Changed
Build macos with xcode llvm
loadImage convert ArrayBuffer issue
Upgrade skia to m131
0.1.58
14 Oct 2024loadImage memleak and performance issue
0.1.57
14 Oct 2024chrome/m130
Creating canvas with width or height of zero or less
Memory leak in Image/loadImage
What's Changed
chrome/m130
Creating canvas with width or height of zero or less
Memory leak in Image/loadImage
0.1.56
19 Sep 2024??is error on node@10Adjust the order of onload calls
What's Changed
??is error on node@10Adjust the order of onload calls
0.1.55
4 Sep 2024Image src is null after loaded
Upgrade skia to m129
What's Changed
Image src is null after loaded
Upgrade skia to m129
0.1.54
17 Aug 2024Update skia to m127
Handle relative and invalid URLs in redirects when passing URL to loadImage()
Image decode should be async
What's Changed
Update skia to m127
Handle relative and invalid URLs in redirects when passing URL to loadImage()
Image decode should be async
chrome/m118
0.1.53
9 Jun 2024armv7 segmentfault
Update README.md
chrome/m116
What's Changed
armv7 segmentfault
Update README.md
chrome/m116
loadImage: Use promise
Trigger onerror while svg image is invalid
0.1.52
17 Apr 2024Negative letter spacing
drawImage with exif orientation
chrome/m125
What's Changed
Negative letter spacing
drawImage with exif orientation
chrome/m125
0.1.51
4 Mar 2024Remove postinstall script for gnu/musl platform
What's Changed
Remove postinstall script for gnu/musl platform
0.1.50
26 Feb 2024Support ctx.letterSpacing and ctx.wordSpacing
0.1.49
22 Feb 2024chrome/m123
Memory leak while encoding png from Canvas
What's Changed
chrome/m123
Memory leak while encoding png from Canvas
0.1.48
21 Feb 2024Memory leak in Canvas encode
isPointInPath/isPointInStroke should respect transform
Map points args order
0.1.47
19 Feb 2024DOMMatrix#transformPoint
Font css parser should handle the font height
0.1.46
19 Feb 2024Draw text on svg
What's Changed
Draw text on svg
0.1.45
5 Feb 2024Use
drawPicturein some blending modes such asdestination-inAdded a couple of examples of the
loadImagefunction to README.mdUpgrade skia to chrome/122
What's Changed
Use
drawPicturein some blending modes such asdestination-inAdded a couple of examples of the
loadImagefunction to README.mdUpgrade skia to chrome/122
Dependency error introduced in the Chinese document Emoji text demo
Upgrade Rust toolchain
0.1.44
22 Aug 2023File extensions in
loadFontsFromDir()are no longer case-sensitive
What's Changed
File extensions in
loadFontsFromDir()are no longer case-sensitive
0.1.43
11 Aug 2023Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.
0.1.42
8 Aug 2023Url is string type
Add
ctx.canvasproperty on svg context
What's Changed
Url is string type
Add
ctx.canvasproperty on svg context
0.1.41
22 May 2023Adjust order of generating bitmap
What's Changed
Adjust order of generating bitmap
0.1.40
9 Apr 2023chrome/m113
What's Changed
chrome/m113
0.1.39
14 Mar 2023Set empty src to Image
0.1.38
11 Mar 2023skia/m112
What's Changed
skia/m112
0.1.37
27 Feb 2023Reject if image is not supported
0.1.36
21 Feb 2023Recalc paint_x according to align if maxWidth is set
What's Changed
Recalc paint_x according to align if maxWidth is set
0.1.35
16 Feb 2023Canvas instance check
DOMMatrix object to skia Transform convert
DOMMatrix to skia Transform
What's Changed
Canvas instance check
DOMMatrix object to skia Transform convert
DOMMatrix to skia Transform
0.1.34
12 Jan 2023Wrong text baseline calculation in drawText and measureText
What's Changed
Wrong text baseline calculation in drawText and measureText
0.1.33
8 Jan 2023maxWidth overflow paint_x position should power the scale ratio
0.1.32
7 Jan 2023chrome/m110
roundRect
getTransform should return DOMMatrix
0.1.31
2 Jan 2023chrome/m107
chrome/m108
Multiple define on cached native object in jest
What's Changed
chrome/m107
chrome/m108
Multiple define on cached native object in jest
Missing canvas property on Context2D
0.1.30
22 Sep 2022TypeScript types for avif config
Error listening to req
Ctx.globalAlpha should effect drawImage
What's Changed
TypeScript types for avif config
Error listening to req
Ctx.globalAlpha should effect drawImage
types: Do not use
referencetagsResize canvas should clear the context
0.1.29
26 Aug 2022isBufferLike in load-image.js
Data url should be standard base64
drawImage alpha should not effect by fillStyle
What's Changed
isBufferLike in load-image.js
Data url should be standard base64
drawImage alpha should not effect by fillStyle
Chrome m106
0.1.28
16 Aug 2022Adjust Node.js external memory while creating Canvas
0.1.27
14 Aug 2022Segfault while drawing empty text
What's Changed
Segfault while drawing empty text
0.1.26
7 Aug 2022Redirect handler
chrome/m105
Miss applying image_smoothing_enabled and image_smoothing_quality
What's Changed
Redirect handler
chrome/m105
Miss applying image_smoothing_enabled and image_smoothing_quality
Test snapshots diff on arm64
Shadow color was not applied correctly
The quality of toDataURL should between 0 and 1
0.1.25
30 Jun 2022Implement loadImage function
Add stream and alt support for Image
Skia chrome/m104
What's Changed
Features
Implement loadImage function
Add stream and alt support for Image
Skia chrome/m104
Bugfix
Skia async prop deprecated in future release
Ctx.filter should store in state and be able to save/restore
Use premultiplied surface as default
Parameters for drawImage(canvas)
Wrong text metrics if text contains chars not including in current font-family
Missing
load-image.jsinpackage.json
0.1.24
30 Jun 2022Implement loadImage function
Add stream and alt support for Image
Skia chrome/m104
What's Changed
Features
Implement loadImage function
Add stream and alt support for Image
Skia chrome/m104
Bugfix
Skia async prop deprecated in future release
Ctx.filter should store in state and be able to save/restore
Use premultiplied surface as default
Parameters for drawImage(canvas)
Wrong text metrics if text contains chars not including in current font-family
0.1.23
23 Jun 2022You can now use
@napi-rs/canvasin older linux distribution, like debian:stretchWhat's Changed
Build optimization
You can now use
@napi-rs/canvasin older linux distribution, like debian:stretch0.1.22
2 Jun 2022Example with copyrightinfo, Bulid with dependencies
chrome/m101
Fix artifacts upload
Breaking changes
Skia now compiled with
C++ 17instread ofC++ 11skia.org/docs/user/build/For docker users, you may need to switch to
busterbase image. For example, Node.js 12 and 14 docker images:node:12-busterandnode:14-buster. For Node.js 16+ images, there are no effects for you.What's Changed
Example with copyrightinfo, Bulid with dependencies
chrome/m101
Fix artifacts upload
Fix width in
TextMetricswhen text is ending with spacesFix baseline bottom y offset
Svg image transparent background should be preserved
Do nothing if lineTo parameters invalid
0.1.21
10 Mar 2022BlendMode::Source should be copy instead of source
Bugfix
What's Changed
BlendMode::Source should be copy instead of source
Bugfix
prevent segmentation fault if mesuring empty text
should not throw if fill/stroke style is invalid
stroke/fill text should treat \n as space
0.1.20
15 Feb 2022Fix the issue of arc to + bezier to + quad to at empty path case
Scoot method for path empty case
The quality default value case of encode(type, quality) method
Bug Fixes
Fix the issue of arc to + bezier to + quad to at empty path case
Scoot method for path empty case
The quality default value case of encode(type, quality) method
Features
Skia chrome/m99
Upgrade to napi2
0.1.19
31 Dec 2021Text align and font fallback
0.1.18
30 Dec 2021Upgrade skia to chrome/m98
Reduce install size for linux glibc/musl
0.1.17
12 Dec 20210.1.15
11 Nov 2021vercel/nftandwebpackcompatible issue
0.1.14
26 Oct 2021Now generating avif images is 10x+ faster.
Use different quality for WebP and JPEG formats, which is more in line with the browser's default values.
The option to generate avif removes alphaQuality and calculates it internally.
Bug Fixes
Now generating avif images is 10x+ faster.
Use different quality for WebP and JPEG formats, which is more in line with the browser's default values.
Features
The option to generate avif removes alphaQuality and calculates it internally.
Add a new SVG generation avif example.