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

Missing function to create png/jpeg images #257

Open
linev opened this issue Jun 7, 2023 · 3 comments
Open

Missing function to create png/jpeg images #257

linev opened this issue Jun 7, 2023 · 3 comments
Assignees

Comments

@linev
Copy link
Member

linev commented Jun 7, 2023

Up to now only makeSVG function was provided.

It is not possible to create images for different objects types.

@linev linev self-assigned this Jun 7, 2023
@linev
Copy link
Member Author

linev commented Jun 7, 2023

Now makeImage function will be introduced. It supports 'png', 'svg' and 'jpeg' image formats.

Usage examples are shown in make_image.htm and make_image.js demos.

Link on dev version: https://jsroot.gsi.de/dev/api.htm#custom_html_create_image

@linev
Copy link
Member Author

linev commented Jun 7, 2023

Unfortunately, there is one unresolved issue with node-canvas component, used for image production in node.js.

It is reported now here: Automattic/node-canvas#2254

Because of this limitation embed images like lego plots on the canvas are not working in node.js.
I hope solution will be find.
Issue does not affect SVG image generation - produced by JSROOT svg images can be used without limitation and, if necessary, converted to any other formats.

@linev
Copy link
Member Author

linev commented Jun 15, 2023

Function appears in https://github.com/root-project/jsroot/releases/tag/7.4.0

Keep open until issue with node-canvas is not resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant