mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-30 21:18:11 -06:00
With a CropAngle, Lightroom's CropLeft/CropTop and CropRight/CropBottom are the top-left and bottom-right corners of the tilted crop on the stored image, and its angle turns the other way to LightCraft's. The import treated the edges as an axis-aligned rectangle in the rotated frame and kept the angle's sign, so straightened crops came out the wrong shape and size. Carry the two corners through the orientation and then LightCraft's straighten rotation (angle = -CropAngle, mirrored orientations flip it back), using the stored image's aspect from fileWidth/fileHeight. On a real catalog every one of 223 straightened crops now matches the frame of Lightroom's export, and the content difference falls to that of unstraightened crops. Refs #483 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>