This is a quick Imgur fix, and reducing the amount of traffic.

This commit is contained in:
Robin 2016-11-03 21:51:27 +01:00
commit a9a745a439
22 changed files with 1136 additions and 757 deletions

View file

@ -25,13 +25,10 @@ using Greenshot.Plugin.Drawing;
using GreenshotPlugin.Core;
using GreenshotPlugin.UnmanagedHelpers;
using System.Drawing.Drawing2D;
using log4net;
namespace Greenshot.Drawing.Filters {
[Serializable()]
[Serializable]
public class BlurFilter : AbstractFilter {
private static ILog LOG = LogManager.GetLogger(typeof(BlurFilter));
public double previewQuality;
public double PreviewQuality {
get { return previewQuality; }
@ -43,7 +40,7 @@ namespace Greenshot.Drawing.Filters {
AddField(GetType(), FieldType.PREVIEW_QUALITY, 1.0d);
}
public unsafe override void Apply(Graphics graphics, Bitmap applyBitmap, Rectangle rect, RenderMode renderMode) {
public override void Apply(Graphics graphics, Bitmap applyBitmap, Rectangle rect, RenderMode renderMode) {
int blurRadius = GetFieldValueAsInt(FieldType.BLUR_RADIUS);
Rectangle applyRect = ImageHelper.CreateIntersectRectangle(applyBitmap.Size, rect, Invert);
if (applyRect.Width == 0 || applyRect.Height == 0) {
@ -54,7 +51,7 @@ namespace Greenshot.Drawing.Filters {
graphics.SetClip(applyRect);
graphics.ExcludeClip(rect);
}
if (GDIplus.isBlurPossible(blurRadius)) {
if (GDIplus.IsBlurPossible(blurRadius)) {
GDIplus.DrawWithBlur(graphics, applyBitmap, applyRect, null, null, blurRadius, false);
} else {
using (IFastBitmap fastBitmap = FastBitmap.CreateCloneOf(applyBitmap, applyRect)) {
@ -63,7 +60,6 @@ namespace Greenshot.Drawing.Filters {
}
}
graphics.Restore(state);
return;
}
}
}

View file

@ -7,8 +7,17 @@ CHANGE LOG:
All details to our tickets can be found here: https://greenshot.atlassian.net
@DETAILVERSION@
Changes for this release:
This has Imgur improvements for the newer API version, this is a backport from Greenshot 1.2.9
With the move to a new hosting platform, we also noticed our update checks are way to often, this needed to be reduced.
1.2.8.12-cab854b RELEASE
There were some major issues with the authenticated (non anonymous) uploads to Imgur.
After contacting Imgur they told us that their old API was deprecated or disabled, unfortunately this was not communicated.
Although we are working hard on Greenshot 1.3, where we changed most of the Imgur code already, we can't release it.