scale_factor 值获取有误
lopo12123 opened this issue · comments
我这个是和electron的对齐的
I have the same issue.
My screen has the scale factor set to 1.25, but this library gets just 1.
I need this value to make some calculations, but cannot get the correct value of the screens.
I tried from Electron using Node-API and from Tauri, but I have the exact same issue in both.
Also, the resolution / size of the screenshots doesn't match with the resolution of the screen.
确认这个bug,再加上3840x2160 w/150%缩放会出现已经获取了display_info: 2560x1440 + 0.6666 scale_factor,再加上fn capture_screen_area里面还乘了一次,然后就获得了原分辨率÷1.5*0.666的一张1706x960的左上角50%不到的局部截图。。。
确认这个bug,再加上3840x2160 w/150%缩放会出现已经获取了display_info: 2560x1440 + 0.6666 scale_factor,再加上fn capture_screen_area里面还乘了一次,然后就获得了原分辨率÷1.5*0.666的一张1706x960的左上角50%不到的局部截图。。。
这是一个错误,我已经在display-info中修复,更新一下lock文件即可
Mine seems to be fine? 4K screen, but I'm on Win11 though. "Screen { display_info: DisplayInfo { id: 2776250164, raw_handle: HMONITOR(161683325), x: 0, y: 0, width: 3072, height: 1728, rotation: 0.0, scale_factor: 1.25, frequency: 60.0, is_primary: true } }"