Bug 514452

Summary: Selection sometimes ends up being a pixel off
Product: [Applications] krita Reporter: m.i.cah.lu.tz8.7
Component: Tools/SelectionAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.14   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: file containing a pre-selected region that will trigger the bug

Description m.i.cah.lu.tz8.7 2026-01-11 12:11:16 UTC
Created attachment 188416 [details]
file containing a pre-selected region that will trigger the bug

SUMMARY
When using the selection tool and then "Transform: Scale" and finally "Trim to Selection" I sometimes get a different resulting resolution from what I've put in the Transform: Scale window.

STEPS TO REPRODUCE
1. Download and open the attached file (The file contains a pre-selected region, don't change it)
2. Select the "Rectangular selection tool"
3. Right click on the pre-selected region
4. Choose Transform -> Scale
5. (Make sure the proportions aren't constrained)
6. Put in Width: 1920px Height: 1080px and click OK.
7. Right click the newly selected region
8. Click on "Trim to Selection"


OBSERVED RESULT
The resulting image is 1921x1080 instead of 1920x1080

EXPECTED RESULT
The resulting image is 1920x1080

Krita/Qt/OS info
Krita

 Version: 5.2.14 (git 31056c6)
 Installation type: installer / portable package
 Hidpi: true

Qt

  Version (compiled): 5.15.7
  Version (loaded): 5.15.7

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.26200
  Pretty Productname: Windows 10 Version 2009
  Product Type: windows
  Product Version: 10

ADDITIONAL INFORMATION