Cropping when rotating
See original GitHub issueHi,
I would like to know, if it’s a bug or something I did wrong : I added today the enableOrientation: true
option. Working great, the image is rotating. Yay. But I have some troubles during cropping.
In some words : I’m having an image larger than higher. When I flip it to the right, the image become higher than larger. If I try to crop the bottom of the image, the result can be transparent. And because images are always better than words :
Here the image I want to upload :
Then I flip it
I select the bottom of the image
And here the result
Am I the only one who experienced that ? Let me know if it’s not clear.
Last version of Croppie : 2.4.1 Google chrome Original dimension of the image : 1000 * 667 Viewport : 200 * 200 Boundary : 260 * 260
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:23 (3 by maintainers)
Top Results From Across the Web
Crop rotation
Crop rotation is the practice of growing a series of different types of crops in the same area across a sequence of growing...
Read more >Understanding Crop Rotation |The Basics and Beyond
Yet each of those favorites interact with the soil differently – and each is susceptible to particular pests and diseases. Through crop rotation ......
Read more >Cropping and rotating images > Developing Basics
Cropping and rotating images · Click the Crop Overlay tool button just below the Histogram panel, or press the R key. · Drag...
Read more >Cropping and Rotating Images
Exposure has tools which make cropping and rotating images quick and easy. We made this video to show you how they work.
Read more >Cropping and rotating images - Adobe Photoshop
If you're cropping a layer (not the Background), you can click Cropped Area: Delete to delete the cropped-out areas, or click Hide to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can still reproduce this with both
master
and the2.5.0
. It only happens withenforceBoundary
disabled and an image with an aspect ratio of something other than1:1
. It looks to me like the problem is that the original image’s width and height are used during the final drawing calculation. If the image was rotated an odd multiple of 90 degrees, that means it is using the width as the height and vice versa. I’m able to fix this so far (I haven’t tested it extensively yet) by adding the following to the end of the_rotate()
function to swap the original values:@thedustinsmith, does that seem like the right way to fix this?
Thanks for all the feedback in this one guys. I believe this issue is fixed in 2.5.2. I can’t recreate the issue using the rotate example in the demo page. 2.5.2 should be released soon.