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:
RKrom 2014-06-02 11:51:38 +02:00
parent 2220f41122
commit 19d5360418

View file

@ -155,18 +155,6 @@ namespace Greenshot.Drawing {
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);
}