mirror of
https://github.com/lovell/sharp.git
synced 2026-02-16 03:16:16 +01:00
Simplify 90/270 orient-before-resize logic (#3762)
This commit is contained in:
committed by
GitHub
parent
5c19f6dd9b
commit
a2cac61209
@@ -964,15 +964,7 @@ namespace sharp {
|
||||
}
|
||||
|
||||
std::pair<double, double> ResolveShrink(int width, int height, int targetWidth, int targetHeight,
|
||||
Canvas canvas, bool swap, bool withoutEnlargement, bool withoutReduction) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Canvas canvas, bool withoutEnlargement, bool withoutReduction) {
|
||||
double hshrink = 1.0;
|
||||
double vshrink = 1.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user