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)
Created attachment 192703 [details] Test file
Confirming. The test file gave me three different horizontal and three different vertical rectangles (and many squares I didn't check), and they were of heights/widths 15, 16 and 17, instead of all being 16.
The fix has been fixed and merged into via MR !2813. The issue was caused by a floating point precision loss during coordinate mapping leading to loss of pixels during width calculation.
(In reply to Aditya Rout from comment #3) *issue has been fixed here's the link to MR for detailed cause : https://invent.kde.org/graphics/krita/-/merge_requests/2813
Fixed in https://invent.kde.org/graphics/krita/-/commit/3578ec5944881995a322421682c5b8c9026248f1, then. Thank you!