jsROOT: exported image resolution

Dear jsROOTers

Is there any way to increase the resolution of exported PNG’s from a jsROOT canvas ?. The resolution is already good. But could have been better for two dimensional distributions. Are there plans to include exports to loss less image formats ?

Cheers

Rohin

Hi Rohin,

Currently JSROOT exports images in resolution which is appeared on the screen.
To increase image size one simply should increase size of browser window.

Same effect can be achieved with slightly different approach. Instead of increasing window size one could define HTML element which is much bigger than screen dimension. And make image out of it. But this approach requires minimal coding with HTML/JavaScript.

Regards,
Sergey

Thanks for the reply Sergey.

Could you please explain a bit more on the second approach

Cheers

Rohin

Hi Rohin,

Default JSROOT UI uses for drawing <div> element, which fit to available browser space.
One could create HTML page with the div like:

<div id="drawing" style="width:4000px;height:3000px"></div>

Drawing in such element will create large image. Example of such custom page is:

https://root.cern/js/latest/demo/read_file.htm

In principle, I can add possibility to specify custom dimension for main UI div.

Regards,
Sergey

Hi add such functionality to the dev branch. One can specify:

http://jsroot.gsi.de/dev/?nobrowser&file=../files/hsimple.root&item=hpx;1&divsize=500x500

Be aware - it is only on jsroot.gsi.de, on root.cern site will be updated later

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.