GNOME Bugzilla – Bug 796121
Cannot take a screenshot on Windows 10
Last modified: 2018-05-15 23:14:41 UTC
Created attachment 372039 [details] Print screen of my entire screen for comparison Hey. There is no way to get the screenshot tool (Create > From Screenshot > any option) to work. It takes pictures of random parts of the Gimp UI. I am attaching a print screen of my entire desktop (FWIW, Create > From Clipboard seems to work) to show what I should be getting. I've tried dragging the selector to the window (in this case, Microsoft Edge, though I tried some random programs just to check), adding a delay to make sure that the window was active, and taking a screenshot of the whole screen.
Created attachment 372040 [details] Screenshot using the "select window" option I get the same result with or without a delay -- just a corner of the Gimp UI and not the window I selected and / or the active window.
Created attachment 372041 [details] Screenshot using the "full screen" option A slightly larger portion of the Gimp UI.
Created attachment 372042 [details] Screenshot using the "full screen" option with delay For this, I used a delay and minimized the gimp UI. It selected the same area of the screen, but got a corner of the file folder that I had open *behind* the gimp UI. I am on Windows 10. Near as I can tell, Windows has some kind of tiling grid for the screen. Gimp will only select or recognize the tile area that the program seems to be in.
Created attachment 372045 [details] Image that describe when the bug happan Bug confirmed and resolved. The bug happens in Windows 10 and probably also in Windows 8, 8.1. This happens when the display scaling is not 100%. look at the image I attached. The solution is simple: In file gimp\plug-ins\screenshot\screenshot-win32.c Under function "InitInstance" - The first line in the function should be: SetProcessDPIAware(); This will solve the bug. I want to point out that I will include this solution in the patch I working on, for this bug report: https://bugzilla.gnome.org/show_bug.cgi?id=793722 I will submit the patch there. the patch will fix this bug also. Thank you for the report. Gil Eliyahu
Awesome. Thanks Gil!
Fixed together with bug 793722: commit ae93b6db187cfc949d06f08a62effdf811199719 Author: Gil Eliyahu <gileli121@gmail.com> Date: Tue May 15 18:04:19 2018 +0300 Plug-ins: fix screenshot bugs in windows. This fixes bugs 793722 and 796121. In particular it fixes: - Single-window screenshot when partly off-screen or covered by another window. - Screenshots when display scaling is not 100%. plug-ins/screenshot/magnification-api-win32.h | 154 ++++++++++++++++++++++++++++++++++++++++++ plug-ins/screenshot/screenshot-win32.c | 353 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 464 insertions(+), 43 deletions(-)