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

overlay.set_view_area(w, h) results in doubled size with headless chrome using a devicePixelRatio=2 display #146

Open
kswang1029 opened this issue Dec 27, 2023 · 0 comments
Labels
question Further information is requested

Comments

@kswang1029
Copy link
Contributor

When we call overlay.set_view_area(w, h) to create a plot with a width of w pixels and a height of h pixels, we will get a png with 2w x 2h pixels if we use a Retina display (ie Mac laptop). To fix this I will need to specify a chrome option --force-device-scale-factor=1 when creating a session such as

session = Session.create(Chrome(headless=True, options=['--use-gl=angle', '--force-device-scale-factor=1','--force-color-profile=srgb']), url_without_token, debug_no_auth=True)

Maybe we should set the flag as default to make it consistent?

@kswang1029 kswang1029 added the question Further information is requested label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant