ExportImage with fixed width and variable DPI

the_math-hobbyist shared this question 3 years ago
Answered

Could I get a fixed width when the image is exported as .png file with the ExportImage command, controlling the DPI? (I want outputs with less kB).


ExportImage("type", "png", "filename", "geogebra.png", "width", pxWidth, "dpi", DPI)


If I fix the width and change the DPI, the filesize doesn't change. And if I remove the width parameter, the kB decreases, but the width too.

Comments (2)

photo
2

DPI is just a flag in the PNG - it doesn't change the filesize


To get a smaller size you need to decrease the pixels

photo
1

Thanks a lot, Michael.

I am a full newbie with this topic. I have been studying to understand it and to propose a solution.

photo
© 2023 International GeoGebra Institute