Ensure resize fit=inside respects 90/270 rotate #3756

This commit is contained in:
Lovell Fuller
2023-08-14 13:45:23 +01:00
parent 3d01775972
commit 5c19f6dd9b
3 changed files with 30 additions and 0 deletions

View File

@@ -968,6 +968,9 @@ namespace sharp {
if (swap && canvas != Canvas::IGNORE_ASPECT) {
// Swap input width and height when requested.
std::swap(width, height);
if (canvas == Canvas::MAX) {
std::swap(targetWidth, targetHeight);
}
}
double hshrink = 1.0;