mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 05:53:27 -07:00
Optimizations
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1650 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
cbf2fae360
commit
7591fa993b
6 changed files with 259 additions and 200 deletions
|
@ -39,8 +39,12 @@ namespace Greenshot.Drawing.Filters {
|
|||
public unsafe override void Apply(Graphics graphics, Bitmap applyBitmap, Rectangle rect, RenderMode renderMode) {
|
||||
int blurRadius = GetFieldValueAsInt(FieldType.BLUR_RADIUS);
|
||||
double previewQuality = GetFieldValueAsDouble(FieldType.PREVIEW_QUALITY);
|
||||
|
||||
ImageHelper.ApplyBlur(graphics, applyBitmap, rect, renderMode == RenderMode.EXPORT, blurRadius, previewQuality, Invert, parent.Bounds);
|
||||
Rectangle applyRect = ImageHelper.CreateIntersectRectangle(applyBitmap.Size, rect, Invert);
|
||||
using (Bitmap blurImage = ImageHelper.CreateBlur(applyBitmap, applyRect, renderMode == RenderMode.EXPORT, blurRadius, previewQuality, Invert, parent.Bounds)) {
|
||||
if (blurImage != null) {
|
||||
graphics.DrawImageUnscaled(blurImage, applyRect.Location);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue