Proposal: Keep cropping rectangle within image
When cropping, the initial drawn rectangle is kept within the image boundaries.
After drawing the rectangle, resizing and moving allows the rectangle to move beyond the boundaries.
Proposed behavior: Stop at the borders.
Alternate behavior: Make the borders sticky, clipping to them within e.g. 5 or 10 pixels. It is much more likely that the user wants to crop to the image than just beyond.
I am willing to take a stab at it, but want to know if the behavior is intentional before I start.
#1 Updated by Stefan almost 5 years ago
- Status changed from New to Accepted
moving the rectangle beyond the borders of the image is intentional. When rotating the cropping rectangle it should be possible to move outside the image (otherwise one cannot capture all parts of the image, or the image is no longer rectangular :) )
Sticky borders would be a good solution to assist users while cropping. We have also in mind that we could introduce sticky edges inside the image when cropping, but we did not have time to add this.
#2 Updated by Markus almost 5 years ago
the idea would be like this:
- compute the Hough Transform of an image
- while the user moves the rectangle, take the current angle (of the rectangle) and search for local maxima +-5 to 10 px -> stick to these edges (the image border can be added manually as maxima to the Hough space)
- add an option which enables sticky edges to the crop toolbar
so if you are still interested in adding this feature, we would be very happy.