mirror of
https://github.com/greenshot/greenshot
synced 2025-07-31 04:00:13 -07:00
Fixed potential issue when multiple effects are used after each other.
This commit is contained in:
parent
52f56d7be5
commit
2220f41122
1 changed files with 2 additions and 2 deletions
|
@ -1377,10 +1377,10 @@ namespace GreenshotPlugin.Core {
|
|||
Image newImage = null;
|
||||
if (maintainAspectRatio && canvasUseNewSize) {
|
||||
newImage = CreateEmpty(newWidth, newHeight, sourceImage.PixelFormat, backgroundColor, sourceImage.HorizontalResolution, sourceImage.VerticalResolution);
|
||||
matrix.Scale((float)newWidth / sourceImage.Width, (float)newHeight / sourceImage.Height);
|
||||
matrix.Scale((float)newWidth / sourceImage.Width, (float)newHeight / sourceImage.Height, MatrixOrder.Append);
|
||||
} else {
|
||||
newImage = CreateEmpty(destWidth, destHeight, sourceImage.PixelFormat, backgroundColor, sourceImage.HorizontalResolution, sourceImage.VerticalResolution);
|
||||
matrix.Scale((float)destWidth / sourceImage.Width, (float)destHeight / sourceImage.Height);
|
||||
matrix.Scale((float)destWidth / sourceImage.Width, (float)destHeight / sourceImage.Height, MatrixOrder.Append);
|
||||
}
|
||||
|
||||
using (Graphics graphics = Graphics.FromImage(newImage)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue