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

[FEATURE] Improve support for pixel ratio > 1 #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

koehnlein
Copy link

@koehnlein koehnlein commented May 25, 2023

The first part of the PR improves generating screenshots for all devices with pixel ratio > 1. The lines koehnlein@c15c294#diff-23be3accec9cccd7a4b66e668a0a62586dec7eb7f4d2fc2b47419a46c6f2feb1R508-R513 include the pixel ratio when calculating the image cropping. Before this change, e.g. with "pixel ratio = 2", only the upper left quarter of the requested area was kept after cropping.

The second part is a new configuration option, described in readme.md:

downscalePixelRatio (default: false) automatically downscales screenshots to the pixel ratio "1". This can be helpful if you or your team are running the test on devices with different pixel densities. When this feature is enabled, screenshots from devices with higher pixel densities are automatically resized to provide more comparable images. Please note that scaled images will never be absolutely identical to the original, you need to set "maxiumDeviation" carefully if you want to pass your tests.

@DavertMik
Copy link
Member

@nixdrey could you say if this feature is related to one in your branch? #82
What do you think, should it be merged?

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 this pull request may close these issues.

2 participants