When rotating images, the rotated corners extend beyond the original canvas bounds, causing the image to be clipped and appear skewed. Fixed by: 1. Calculate canvas size needed to fit rotated image 2. Use formula: newSize = sqrt((w*cos)^2 + (h*sin)^2) 3. Center image and rotate around center of new canvas 4. Update cropBounds to new canvas dimensions Now when user rotates an image, the full rotated result is saved without any clipping or skewing. The saved image dimensions will be larger than the original to accommodate the rotation. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
13 KiB
13 KiB