You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Windows 10 with a 3840x2160 monitor with "Scale and layout" set to 125% via the Windows Display Settings, a screenshot should have the same dimensions as the physical pixel of the monitor, but instead returns an image that is 3072x1728. Note that if you multiply these incorrect dimensions by 1.25 you get 3840x2160.
use Imager::Screenshot 'screenshot';
my$im = screenshot();
my$window_width = $im->tags(name=>'ss_window_width');
my$window_height = $im->tags(name=>'ss_window_height');
my$window_type = $im->tags(name=>'ss_type');
print"$window_width x $window_height using $window_type\n";
The output of the above is:
3072 x 1728 using Win32
The expected output, indicating the correct screenshot dimensions, would be:
3840 x 2160 using Win32
The captured screenshot image can be written to file via:
$im->write(file=>"screenshot.png", type=>'png');
The written image has been cropped to the incorrect dimensions.
The text was updated successfully, but these errors were encountered:
Is it possible to make hi-dpi awareness an option and that way let the users of your implementation decide for themselves if they want to risk redraws? In my particular use case I have a non-GUI scripted process (i.e. has no windows of its own) that needs to take full screenshots of a given monitor from time to time. Redrawing is presumably not an issue in this case.
In Windows 10 with a 3840x2160 monitor with "Scale and layout" set to 125% via the Windows Display Settings, a screenshot should have the same dimensions as the physical pixel of the monitor, but instead returns an image that is 3072x1728. Note that if you multiply these incorrect dimensions by 1.25 you get 3840x2160.
The output of the above is:
The expected output, indicating the correct screenshot dimensions, would be:
The captured screenshot image can be written to file via:
The written image has been cropped to the incorrect dimensions.
The text was updated successfully, but these errors were encountered: