| Summary: | Screenshots are downscaled with dpr > 1 | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Méven Car <meven29> |
| Component: | effects-various | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | CC: | hello, kde |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
*** Bug 409762 has been marked as a duplicate of this bug. *** Happens only on Wayland right? (In reply to David Redondo from comment #2) > Happens only on Wayland right? I don't think so, it depends only on scaling see https://bugs.kde.org/show_bug.cgi?id=409762 *** This bug has been marked as a duplicate of bug 409762 *** (In reply to Méven Car from comment #3) > (In reply to David Redondo from comment #2) > > Happens only on Wayland right? > > I don't think so, it depends only on scaling see > https://bugs.kde.org/show_bug.cgi?id=409762 Oups indeed it is wayland only. |
SUMMARY Screenshots made with spectacle when using a scale ratio are downscaled. I believe the fix needs to be made in kwin/effects/screenshot/screenshot.cpp:607 : QImage ScreenShotEffect::blitScreenshot(const QRect &geometry) { QImage img; if (effects->isOpenGLCompositing()) { img = QImage(geometry.size(), QImage::Format_ARGB32); if (GLRenderTarget::blitSupported() && !GLPlatform::instance()->isGLES()) { GLTexture tex(GL_RGBA8, geometry.width(), geometry.height()); GLRenderTarget target(tex); target.blitFromFramebuffer(geometry); // copy content from framebuffer into image tex.bind(); glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*)img.bits()); tex.unbind(); } else { glReadPixels(0, 0, img.width(), img.height(), GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*)img.bits()); } ScreenShotEffect::convertFromGLImage(img, geometry.width(), geometry.height()); } To have an output image whose output image is scaled up. STEPS TO REPRODUCE 1. With a scaling ratio of 2 for instance (physical res is 3840x2160) 2. Take a fullscreen screenshot with spectacle OBSERVED RESULT Screenshot size is 1920*1080. EXPECTED RESULT Screenshot size is 3840x2160. SOFTWARE/OS VERSIONS Operating System: Kubuntu 19.10 KDE Plasma Version: 5.17.80 KDE Frameworks Version: 5.64.0 Qt Version: 5.12.4 Kernel Version: 5.3.0-23-generic