Skip to content

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

Description

@kswang1029

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions