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

In _to_png, it'll be nicer to use driver.fullscreen_window() instead of using driver.maximize_window(). #1539

Closed
liusida opened this issue Nov 20, 2021 · 2 comments · Fixed by #1656

Comments

@liusida
Copy link

liusida commented Nov 20, 2021

Thank you for providing such a great tool. I was using folium to export some PNG images, and concatenating them into a video. However, the dimension of the exported PNG image is a little bit smaller than common dimensions like 1366x768.
I digged into the source code a bit and discovered that in function _to_png(), driver.maximize_window() was used. If I change this to driver.fullscreen_window(), the dimension of the exported PNG will be the resolution of the (imaginary) screen, like 1366x768.

driver.maximize_window()

This could be a minor improvement.

And btw, does anyone know how to control the (imaginary) screen resolution? Thanks.

@kburchfiel
Copy link

I don't have much familiarity with to_png(), but in the meantime, I am using Selenium to create very large screenshots of my maps. Feel free to use the Selenium code near the bottom of this file (starting with "# Finally, the function uses the Selenium library to create a screenshot"): https://github.com/kburchfiel/census_folium_tutorial/blob/master/census_folium_viewer.py

@ocefpaf
Copy link
Member

ocefpaf commented Jan 26, 2022

I'm not an expert but fullscreen sounds OK to me. Do you want to send a PR with that change?

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

Successfully merging a pull request may close this issue.

3 participants