Fix for #1619, AutoCrop now takes the final image (all elements included) into the calculation.

This commit is contained in:
RKrom 2014-06-02 12:46:58 +02:00
parent 52b00eb79a
commit 85d73cd8e0
2 changed files with 6 additions and 3 deletions

View file

@ -822,7 +822,10 @@ namespace Greenshot.Drawing {
/// </summary>
/// <returns>true if cropped</returns>
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;
}