Skip to content
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

能不能支持转jpg #228

Closed
ppjjzz opened this issue Apr 27, 2023 · 2 comments
Closed

能不能支持转jpg #228

ppjjzz opened this issue Apr 27, 2023 · 2 comments

Comments

@ppjjzz
Copy link

ppjjzz commented Apr 27, 2023

png有点大,能否支持svg转jpg?

@yisibl
Copy link
Owner

yisibl commented Apr 27, 2023

这个项目的首要目标是输出无损的位图格式,jpeg 的优先级不高。

不过 @Brooooooklyn 有一个分支支持输出 jpeg,你可以编译试试:https://github.com/yisibl/resvg-js/tree/jpeg

@zimond
Copy link
Collaborator

zimond commented Sep 23, 2023

你可以用 RenderedImage::pixels() 这个API拿到RGBA buffer(Uint8Array),然后随便用什么库去encode

@zimond zimond closed this as completed Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants