Bug 492965

Summary: Image Split tool does not split evenly on guides
Product: [Applications] krita Reporter: aarqon
Component: ToolsAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: minor    
Priority: NOR    
Version First Reported In: 5.2.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description aarqon 2024-09-11 03:20:13 UTC
SUMMARY
Using the "Use guides" options in Image Split results in unevenly split images that are off by one pixel. For instance, setting the guides on a pixel art sheet 16px apart seems to place them with pixel precision, but what should be 16x16 images will come out as 17x15 or 15x15. Attempting to nudge the guides to correct for this only makes the error worse.

STEPS TO REPRODUCE
1. Set up any document
2. Place guides in any pixel-precise pattern (e.g. 16px apart vertically and horizontally)
3. Image > Image Split, check Use Guides on both dimensions, and click Apply

OBSERVED RESULT
Produced images are always 1px off in either direction.

EXPECTED RESULT
Produced images should be split along the actual lines indicated by the guides, which seem to snap precisely to pixel edges at these small resolutions.

SOFTWARE/OS VERSIONS
Windows: 10.0.19045 Build 19045
Krita: 5.2.3 (git 68d178c)