Corrected getting the screenshot on Windows when the screen is scaled larger than 100% (#8278).

This commit is contained in:
Dirk Lemstra
2025-08-16 18:58:30 +02:00
parent 1d93c1f32b
commit 54edf56c82
+2 -2
View File
@@ -168,8 +168,8 @@ static Image *ReadSCREENSHOTImage(const ImageInfo *image_info,
screen=AcquireImage(image_info,exception);
geometry.x=0;
geometry.y=0;
geometry.width=(size_t) GetDeviceCaps(hDC,HORZRES);
geometry.height=(size_t) GetDeviceCaps(hDC,VERTRES);
geometry.width=(size_t) GetDeviceCaps(hDC,DESKTOPHORZRES);
geometry.height=(size_t) GetDeviceCaps(hDC,DESKTOPVERTRES);
if (image_info->extract != (char *) NULL)
{
geometry.x=MagickMin(screen->extract_info.x,(ssize_t) geometry.width);