-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: .pixels
return type changed to Uint8ClampedArray
#304
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -44,7 +44,7 @@ export class RenderedImage { | |||
/** Write the image data to Buffer */ | |||
asPng(): Buffer | |||
/** Get the RGBA pixels of the image */ | |||
get pixels(): Buffer | |||
get pixels(): Uint8ClampedArray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Brooooooklyn napi-rs 可以直接生成 readonly pixels: Uint8ClampedArray
吗?
f71a9a6
to
09bb8d0
Compare
} | ||
} | ||
break | ||
case 's390x': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两个新增的平台常见吗?我的 CI 还没有。
Part of #300
Now you can pass the resvg-js rendered pixels to the canvas in the browser via
new ImageData()
.