mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Removed scaling from Transform in the ImageContainer, this is already implemented by drawing to the "new" width/height and doesn't loose information.
This commit is contained in:
parent
2220f41122
commit
19d5360418
1 changed files with 0 additions and 12 deletions
|
@ -155,18 +155,6 @@ namespace Greenshot.Drawing {
|
||||||
image = ImageHelper.ApplyEffect(image, new RotateEffect(rotateAngle), tmpMatrix);
|
image = ImageHelper.ApplyEffect(image, new RotateEffect(rotateAngle), tmpMatrix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
float scaleX = CalculateScaleX(matrix);
|
|
||||||
float scaleY = CalculateScaleY(matrix);
|
|
||||||
int newWidth = (int)(Width * scaleX);
|
|
||||||
int newHeight = (int)(Height * scaleY);
|
|
||||||
if (newWidth != Width || newHeight != Height) {
|
|
||||||
using (var tmpMatrix = new Matrix()) {
|
|
||||||
using (Image tmpImage = image) {
|
|
||||||
image = ImageHelper.ApplyEffect(image, new ResizeEffect(newWidth, newHeight, false), tmpMatrix);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
base.Transform(matrix);
|
base.Transform(matrix);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue