How to set dpi of plotexpress png files

As the title.Currently i am helping my uncle to build a online Enneagram report generator.
The trouble is that when i using reportlab libraries to reading and inster the static images render by px and it was ambiguous.
So how do i fix that?

Searching for a similar issue. Caught your string. Much obliged for making it. Searching forward for arrangement.

skylight paycards

Ok,fine,i will check some other same issuesπŸ˜‚

@Elin_Liu and @Erick895

The png files are saved setting the resolution in pixels as follows:

import plotly.io as pio
pio.write_image(fig. "imagename.png", width=500, height=350, scale =1)

DPI are given for svg and pdf files.
To save such an image of a inches width and b inches height, with 300DPI,
set width and height in pio.write_image, as follows:

pio.write_image(fig, "test.svg", width=a*300, height=b*300, scale=1)

See also the same discussion here https://community.plotly.com/t/image-export-how-to-set-dpi-alternatively-how-to-scale-down-using-width-and-height/49536.
A more detailded presentation here:
https://medium.com/@onlinelogomaker/what-is-the-difference-between-dpi-ppi-resolution-and-image-size-b42328e7ed22.

To control better your saved image size, you can use this convertor:
https://pixelcalculator.com/en.

Got it,i will check later.Thanks