I'm cropping a rotated image, but I want to keep the ascect ratio fixed and not have any "extra" black pixels. Here's an example:
image = ExampleData[{"TestImage", "House"}];
rot = ImageRotate[image, 5 Degree]
ImageCrop[rot, {250, 200}]
But this isn't a good solution because it specifies the exact crop and I'm not sure what that will be generally. So really, what I want is the take a big of a crop as possible, preserving some given aspect ratio (which by default would be the same as the original image's asepect).
I would manually do it like this:
Details
- Please assume we know the exact angle of rotation and have the original unrotated image.
- Related:
AspectRatio
restriction. I see the complication now. $\endgroup$