From 85d73cd8e065f2fefee16a1da15eb3afb511d38a Mon Sep 17 00:00:00 2001 From: RKrom Date: Mon, 2 Jun 2014 12:46:58 +0200 Subject: [PATCH] Fix for #1619, AutoCrop now takes the final image (all elements included) into the calculation. --- Greenshot/Drawing/Surface.cs | 5 ++++- Greenshot/releases/additional_files/readme.txt.template | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs index b3f7c9fd2..edb5c50ff 100644 --- a/Greenshot/Drawing/Surface.cs +++ b/Greenshot/Drawing/Surface.cs @@ -822,7 +822,10 @@ namespace Greenshot.Drawing { /// /// true if cropped public bool AutoCrop() { - Rectangle cropRectangle = ImageHelper.FindAutoCropRectangle(Image, conf.AutoCropDifference); + Rectangle cropRectangle; + using (Image tmpImage = GetImageForExport()) { + cropRectangle = ImageHelper.FindAutoCropRectangle(tmpImage, conf.AutoCropDifference); + } if (!IsCropPossible(ref cropRectangle)) { return false; } diff --git a/Greenshot/releases/additional_files/readme.txt.template b/Greenshot/releases/additional_files/readme.txt.template index 07ee05203..ed7310147 100644 --- a/Greenshot/releases/additional_files/readme.txt.template +++ b/Greenshot/releases/additional_files/readme.txt.template @@ -18,8 +18,8 @@ Changes: * Editor: Element locations are now correctly updated when rotating or resizing. Bugs resolved: -* Bug #1610: Image editor: 'Obfuscate' and 'Highlight' won't rotate correctly - +* Bug #1610: Image editor: 'Obfuscate' and 'Highlight' won't rotate correctly. +* Bug #1619: Autocrop didn't take any elements into account. 1.1.9.13-g01ce82d Windows 8.1 & Box bug-fix Release