diff --git a/Greenshot/Helpers/IECaptureHelper.cs b/Greenshot/Helpers/IECaptureHelper.cs index 76fa0170a..2b9b9b762 100644 --- a/Greenshot/Helpers/IECaptureHelper.cs +++ b/Greenshot/Helpers/IECaptureHelper.cs @@ -43,7 +43,7 @@ namespace Greenshot.Helpers { /// public static class IECaptureHelper { private static ILog LOG = LogManager.GetLogger(typeof(IECaptureHelper)); - private static CoreConfiguration configuration = IniConfig.GetIniSection(); + private static readonly CoreConfiguration configuration = IniConfig.GetIniSection(); // Helper method to activate a certain IE Tab public static void ActivateIETab(WindowDetails ieWindowDetails, int tabIndex) { @@ -96,7 +96,7 @@ namespace Greenshot.Helpers { /// /// Get Windows displaying an IE /// - /// List + /// IEnumerable WindowDetails public static IEnumerable GetIEWindows() { foreach (WindowDetails possibleIEWindow in WindowDetails.GetAllWindows()) { if (possibleIEWindow.Text.Length == 0) { @@ -369,9 +369,8 @@ namespace Greenshot.Helpers { // bitmap to return Bitmap returnBitmap = null; - Size pageSize = Size.Empty; try { - pageSize = PrepareCapture(documentContainer, capture); + Size pageSize = PrepareCapture(documentContainer, capture); returnBitmap = capturePage(documentContainer, capture, pageSize); } catch (Exception captureException) { LOG.Error("Exception found, ignoring and returning nothing! Error was: ", captureException); diff --git a/Greenshot/Helpers/IEInterop/IEContainer.cs b/Greenshot/Helpers/IEInterop/IEContainer.cs index 0ba19a4df..fbd0c23d2 100644 --- a/Greenshot/Helpers/IEInterop/IEContainer.cs +++ b/Greenshot/Helpers/IEInterop/IEContainer.cs @@ -330,11 +330,14 @@ namespace Greenshot.Helpers.IEInterop { public Color BackgroundColor { get { - if (document2.bgColor != null) { - string bgColorString = (string)document2.bgColor; - int rgbInt = Int32.Parse(bgColorString.Substring(1), NumberStyles.HexNumber); - Color bgColor = Color.FromArgb(rgbInt >> 16, (rgbInt >> 8) & 255, rgbInt & 255); - return bgColor; + try { + string bgColor = (string)document2.bgColor; + if (bgColor != null) { + int rgbInt = Int32.Parse(bgColor.Substring(1), NumberStyles.HexNumber); + return Color.FromArgb(rgbInt >> 16, (rgbInt >> 8) & 255, rgbInt & 255); + } + } catch (Exception ex) { + LOG.Error("Problem retrieving the background color: ", ex); } return Color.White; } diff --git a/Greenshot/releases/additional_files/readme.txt.template b/Greenshot/releases/additional_files/readme.txt.template index e12d342b8..a8acebcb7 100644 --- a/Greenshot/releases/additional_files/readme.txt.template +++ b/Greenshot/releases/additional_files/readme.txt.template @@ -14,7 +14,8 @@ Changes: * Optimized Greenshots update check to use even less traffic by checking the time-stamp of the update feed before downloading it. Bugs Resolved: -* BUG-1686: Issues with the background if a filter (highlight etc) is used. +* BUG-1686: Shadow (drop shadow or torn edge) grows if a filter (highlight etc) is used and an element is moved around +* BUG-1700: IE capture only works once 1.2.2.43-380f581 RC2