react-screen-capture icon indicating copy to clipboard operation
react-screen-capture copied to clipboard

Seems to break on all screens above 1080p

Open MrCollinsR opened this issue 3 years ago • 4 comments

Tested the Demo on 4 computers: M1 Macbook Pro: Cuts off capture 2020 Macbook Pro: Cuts off Capture Dell XPS 4k: Cuts off capture Gaming Rig 1080p: Works perfectly.

In the below image i captured the entire box but as you can see the capture that gets saved is just a fraction of that. image

It appears that when your resolution is higher than 1080p the capture has the wrong resolution so it only records a portion of what you are trying to capture. I have seen the same behavior on other react screen cap libraries so I believe the issue is in the core library that has likely been forked. However i haven't had a chance to deep dive yet.

MrCollinsR avatar Jun 13 '22 22:06 MrCollinsR

I can confirm the problem exist - in case if screen resolution bigger than 1080 Capture does not capture selected region correctly...

vyemialyanchyk avatar Feb 19 '23 05:02 vyemialyanchyk

reproducible on live demo example

vyemialyanchyk avatar Feb 19 '23 05:02 vyemialyanchyk

after small research the problem related with window.devicePixelRatio in case if I make screen resolution so window.devicePixelRatio := 1 - capture works correctly but with maximum screen resolution 3840 x 2160 when window.devicePixelRatio := 1.5 - capture works incorrectly..

vyemialyanchyk avatar Feb 19 '23 06:02 vyemialyanchyk

https://github.com/Bunlong/react-screen-capture/pull/14 - this is fix for the issue

vyemialyanchyk avatar Feb 19 '23 07:02 vyemialyanchyk