dmtrKovalenko / odiff

The fastest pixel-by-pixel image visual difference tool in the world.
MIT License
1.96k stars 73 forks source link

Screenshot's resolution varies on different screen resolution. #84

Closed Manishh09 closed 1 year ago

Manishh09 commented 1 year ago

By default the screenshot which are taken are having the resolution of 1503x791 px ( When my PC resolution is 1920x1080) And if we reduce display resolution in PC and the resolution of screenshots taken is varying. Is there any way to fix this and make this independent of screen resolution. Thanks!

dmtrKovalenko commented 1 year ago

I don't think so because the goal is to validate every pixel.

What you should do is to run your app on a specified resolution, so the screenshot you are making is always same.

Ideally run everything in isolation. E.g. docker container.

Manishh09 commented 1 year ago

Thanks for swift reply Dmitriy!

Do you mean , whether the cypress should run on a specified PC resolution so as to get the same screenshot OR how? Could you please clarify this.

Thank you!

dmtrKovalenko commented 1 year ago

Either this or change the size of the window that is taking screenshot.

Environment for visual regression should be as isolated as possible.