Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] develop from ShareX:develop #30

Open
wants to merge 399 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
399 commits
Select commit Hold shift + click to select a range
99d8e5b
Added "Reset options" button to FFmpegOptionsForm
Jaex Sep 7, 2023
691c901
Fixed audio recording sync issues
Jaex Sep 17, 2023
73f9cf4
Update FFmpeg download URL
Jaex Sep 17, 2023
4136b56
Increase screen recording FPS limits when dev mode enabled
Jaex Sep 17, 2023
aa51b11
Replace "kbit/s" with "kbps"
Jaex Sep 20, 2023
3c5ebee
Use ComboBox control for AAC bitrate
Jaex Sep 20, 2023
cab4a7f
Use ComboBox control for Opus bitrate
Jaex Sep 20, 2023
be35d16
Code refactoring
Jaex Sep 21, 2023
cee466b
Use ComboBox control for Vorbis quality
Jaex Sep 23, 2023
c926d44
Use ComboBox control for MP3 quality
Jaex Sep 23, 2023
3bd5140
Update FFmpegPaletteGenStatsMode and FFmpegPaletteUseDither
Jaex Sep 23, 2023
09873d6
Added ScaleImageFast function for OCR
Jaex Sep 29, 2023
a85293c
Rename hex entries
Jaex Sep 30, 2023
5b781a8
Use only bitrate for nvenc, amf and qsv
Jaex Oct 1, 2023
67fdeca
Code cleanup
Jaex Oct 2, 2023
6fd4db7
Added pin to screen options window
Jaex Oct 7, 2023
2f07fba
Use const instead of enum
Jaex Oct 7, 2023
84dacf3
fixed #7086: Auto hide toolbar if toolbar is bigger than form
Jaex Oct 7, 2023
4cfe3eb
Set Localizable true
Jaex Oct 8, 2023
5fb0493
Center toolbar
Jaex Oct 8, 2023
e170d70
Use ToolStripEx
Jaex Oct 8, 2023
9283e0b
On Windows 11 do not round corners
Jaex Oct 8, 2023
2be3240
Update SSH.NET to 2023.0.0
WojciechNagorski Oct 11, 2023
9526a38
Removed Gfycat uploader
Jaex Oct 12, 2023
619f9b3
Merge pull request #7104 from WojciechNagorski/new-sshnet
Jaex Oct 14, 2023
f1fdb04
OneDrive Add Use Direct Link
Yi-pixel Oct 12, 2023
9b68152
Merge pull request #7108 from Yi-pixel/develop-1014
Jaex Oct 15, 2023
3f46ff1
Update FluentFTP
Jaex Oct 15, 2023
92ffd12
Auto copy ShareX_NativeMessagingHost.exe file
Jaex Oct 23, 2023
e81a42c
Update Polish translations
mxgic1337 Oct 23, 2023
571304f
Merge pull request #7116 from mxgic1337/develop
Jaex Oct 24, 2023
71e9c58
Fixed "Native host has exited" error
Jaex Oct 24, 2023
e15141e
fixed #6904: Added "Shorten URL with ShareX" support to browser exten…
Jaex Oct 24, 2023
bf50864
For backward compatibility
Jaex Oct 24, 2023
c49ce8b
Added ProcessImagesDuringExtensionUpload option
Jaex Oct 26, 2023
6b9d74e
Rename enum
Jaex Oct 26, 2023
8b28b83
Use HttpClient & check content type
Jaex Oct 26, 2023
d32a050
Use HttpClient in DownloadStringAsync function
Jaex Oct 27, 2023
1c29fbe
Use HttpClient in DownloadFileAsync function
Jaex Oct 27, 2023
010c74f
Use HttpClient in GetFileNameFromWebServerAsync function
Jaex Oct 27, 2023
7085012
Make HttpClientFactory thread safe
Jaex Oct 28, 2023
bbb3d10
Use HttpClient in FileDownloader class
Jaex Oct 28, 2023
a1c5133
Code refactoring
Jaex Oct 29, 2023
9468b00
Added WebHelpers class
Jaex Oct 29, 2023
0ab967f
Code refactoring
Jaex Oct 29, 2023
636f8ed
Scrolling capture hotkey now also supports start/stop
Jaex Nov 5, 2023
8da351c
update zh-TW localization
candela97 Nov 5, 2023
dd7e1bb
Added "Load image from URL" button to EditorStartupForm
Jaex Nov 8, 2023
15afce0
fixed #7138: Preserve spaces on Korean language
Jaex Nov 8, 2023
c2c46f9
Merge pull request #7131 from candela97/i18n-zhtw
Jaex Nov 12, 2023
b8f5abc
Use DataGridView for main window hotkey list
Jaex Nov 17, 2023
1d04dc1
Do not save default hotkey task settings to decrease config size sign…
Jaex Nov 21, 2023
3274e2c
Fixed OCR scale issue
Jaex Nov 22, 2023
ccc2db5
Do not use audio encoder if input file is png, apng or webp
Jaex Nov 26, 2023
1d1581d
Removed -hide_banner
Jaex Nov 28, 2023
fa1ba22
Create SECURITY.md
Jaex Nov 30, 2023
bcab662
Include resx files
Jaex Nov 30, 2023
1004479
Update FluentFTP
Jaex Nov 30, 2023
ad3cad7
Update Microsoft.Windows.SDK.Contracts
Jaex Nov 30, 2023
cb4d4d1
Added Background & EdgeOverlap options to DrawParticles image effect
Jaex Nov 30, 2023
389caa4
Added "Use random image effect" option
Jaex Dec 1, 2023
410a617
Added Radius option to Gaussian Blur image effect
Jaex Dec 2, 2023
96e46f5
Move SECURITY.md file
Jaex Dec 2, 2023
ab38428
Code refactoring
Jaex Dec 2, 2023
3af89ed
fixed #7178: Fix hotkey list location
Jaex Dec 7, 2023
dbc7312
If DevMode then show detailed progress text
Jaex Dec 13, 2023
67d3edc
update es-MX translation
DMCS20 Dec 13, 2023
52a71c8
Merge pull request #7185 from DMCS20/es-MX-localization
Jaex Dec 14, 2023
ce6ce4d
Added window list and "Top most" checkbox to "Inspect window" tool
Jaex Dec 18, 2023
f02f20d
Added Opacity option to "Inspect window" tool
Jaex Dec 20, 2023
3409437
Include resx files
Jaex Dec 20, 2023
d6a5568
Rename "Hash check" tool to "Hash checker"
Jaex Dec 23, 2023
4443b10
Hash checker UI improvements
Jaex Dec 23, 2023
780d513
Implemented Undo/redo function on image editory
gregorygregio Dec 23, 2023
6911ba2
Added language resource for the Redo menu item
gregorygregio Dec 23, 2023
3d13567
Update check button
Jaex Dec 24, 2023
accef08
Update QRCodeForm.resx
Jaex Dec 25, 2023
5e0ee63
Implementing IDisposable interface on ImageEditorMemento and ImageEdi…
gregorygregio Dec 27, 2023
981b3cc
Merge pull request #7193 from gregorygregio/feature/ImageEditorUndoRedo
Jaex Dec 27, 2023
2c86f83
Code refactoring
Jaex Dec 27, 2023
3be1ffe
Code refactoring
Jaex Dec 27, 2023
e5fe1a8
Fixed undo/redo bug
Jaex Dec 27, 2023
aa6f127
Fixed undo/redo bug
Jaex Dec 27, 2023
40bd40c
Code refactoring
Jaex Dec 27, 2023
69e9587
Fixed undo/redo bugs
Jaex Dec 27, 2023
692a9e6
Fixed undo/redo bug
Jaex Dec 27, 2023
0f42fd1
Fixed undo/redo bug
Jaex Dec 28, 2023
ae07657
Removed Steamworks.NET dependency
Jaex Dec 28, 2023
57a2f3b
Code cleanup
Jaex Dec 28, 2023
1ef60d9
Added ocr option to close OCR window after opening browser for transl…
gregorygregio Jan 2, 2024
077e74a
Update year
Jaex Jan 2, 2024
3807bbd
Merge branch 'ShareX:develop' into feature/CloseAfterOpenServiceLinkOCR
gregorygregio Jan 3, 2024
8943947
Implementing save changes before closing dialog for the image editor …
gregorygregio Jan 3, 2024
475e1f7
Merge branch 'develop' into feature/SaveB4CloseEditorOption
gregorygregio Jan 3, 2024
1681b39
NuGet update
Jaex Jan 5, 2024
154db4b
Fixing RegionCaptureForm_SaveChangesBeforeClosingEditor to include qu…
gregorygregio Jan 5, 2024
844be47
Merge branch 'feature/SaveB4CloseEditorOption' of https://github.com/…
gregorygregio Jan 5, 2024
0e724d1
Merge branch 'ShareX:develop' into feature/SaveB4CloseEditorOption
gregorygregio Jan 5, 2024
c69a51d
Fixing code convension non-compliances
gregorygregio Jan 5, 2024
fad13ff
Merge pull request #7204 from gregorygregio/feature/SaveB4CloseEditor…
Jaex Jan 6, 2024
d6cb6d9
Merge pull request #7202 from gregorygregio/feature/CloseAfterOpenSer…
Jaex Jan 6, 2024
75734e1
Undo/redo improvements
Jaex Jan 6, 2024
304acc6
Update TaskSettingsForm.resx
Jaex Jan 9, 2024
b85163b
resx cleanup
Jaex Jan 11, 2024
4cb7820
Added "Capture pre configured window" hotkey
Jaex Jan 14, 2024
e0e58b9
Update FFmpeg to 6.1
Jaex Jan 14, 2024
16b12b8
Check is window active
Jaex Jan 14, 2024
d22ccbe
Make ImageBeautifierForm localizable
L1Q Jan 17, 2024
d347541
Update Russian translation
L1Q Jan 17, 2024
6d8e466
Merge pull request #7219 from L1Q/develop
Jaex Jan 17, 2024
f1635a4
Fix focus issue
Jaex Jan 17, 2024
10c6f5e
Support closing windows with "Escape" key
Jaex Jan 17, 2024
a8809da
Close main window on key up
Jaex Jan 17, 2024
7407df1
Automatically fix video/audio sources
Jaex Jan 19, 2024
fcf846c
Rename Twitter to X & update logo
Jaex Jan 19, 2024
5ae739d
Convert project to SDK style
Jaex Jan 20, 2024
c3a0f83
csproj fixes
Jaex Jan 20, 2024
9e8cf91
Code refactoring
Jaex Jan 21, 2024
33ef841
Code refactoring
Jaex Jan 21, 2024
6e7b5b9
Fix version patching
Jaex Jan 21, 2024
130da18
Code refactoring
Jaex Jan 21, 2024
7e487ce
Add Directory.build.props file to solution items
Jaex Jan 21, 2024
6db2c3a
Inno Setup Code to choose pf or userpf
McoreD Jan 21, 2024
575973f
Remove ForceDirectories(installDir)
McoreD Jan 21, 2024
c97126a
Code refactoring
Jaex Jan 22, 2024
1fd1c46
Fix PlatformTarget
Jaex Jan 23, 2024
e9116fa
Added auto complete support to history & image history window search box
Jaex Jan 29, 2024
d87ed5a
Rename "Google image search" to "Google Lens"
Jaex Feb 4, 2024
8736244
NuGet update
Jaex Feb 4, 2024
8b94ddb
fixed #3495: In image editor use "Ctrl + C" instead of "Ctrl + Shift …
Jaex Feb 6, 2024
b699edc
Removed unused method
Jaex Feb 10, 2024
bedd13c
Implement single instance support using named pipes instead of ipc
Jaex Feb 11, 2024
856a1a0
Code refactoring
Jaex Feb 11, 2024
280f3c5
Check length
Jaex Feb 21, 2024
4f1e2f0
Added "Disable Print Screen key for Snipping Tool" option to setup
Jaex Feb 24, 2024
adeb714
Use built in IsAdmin function
Jaex Feb 27, 2024
0ccf9a4
Renamed "Google image search" to "Google Lens" in Polish translations.
mxgic1337 Feb 27, 2024
848f62f
Merge pull request #7281 from mxgic1337/develop
Jaex Feb 28, 2024
5fb4fd9
Code refactoring
Jaex Mar 2, 2024
aa51696
Added Data URL support for browser extension base64 image uploads
Jaex Mar 3, 2024
36c38c5
Update ApplicationConfig.cs
Jaex Mar 5, 2024
dca8fa2
Translation: Hebrew missing strings
erelado Mar 5, 2024
92c290e
Fixed Image Beautifier issues
Jaex Mar 8, 2024
da84abc
Update pr.yml
Jaex Mar 8, 2024
469b25e
Update stale.yml
Jaex Mar 8, 2024
23d2203
Update build.yml
Jaex Mar 8, 2024
dc968df
Update build.yml
Jaex Mar 8, 2024
f33d435
Merge pull request #7294 from erelado/develop
Jaex Mar 9, 2024
2bb5b97
NuGet update
Jaex Mar 10, 2024
0cea0ce
Release 16.0.0
Jaex Mar 10, 2024
e6a2ac8
Set Dev true
Jaex Mar 10, 2024
c3b2756
Fixed unhandled exception in SingleInstanceManager
Jaex Mar 11, 2024
a17a1f3
Code refactoring
Jaex Mar 12, 2024
6d35345
fixed #7300: Fixed Pin to screen auto hide issue
Jaex Mar 13, 2024
742f1af
Check Debugger.IsAttached
Jaex Mar 14, 2024
e491581
Code refactoring
Jaex Mar 14, 2024
ccaf48b
Code refactoring
Jaex Mar 16, 2024
f77ce88
Release 16.0.1
Jaex Mar 17, 2024
3b3c064
Set Dev true
Jaex Mar 17, 2024
d64ae97
fixed #7329: SingleInstanceManager improvements
Jaex Mar 20, 2024
1a308af
fixed #7346: Improve CloseOnEscape logic
Jaex Mar 21, 2024
a32a1bc
Fixed ImageBeautifier glitch
Jaex Mar 23, 2024
ee958d8
Fixed group box size
Jaex Mar 23, 2024
038b270
#7329: SingleInstanceManager improvements
Jaex Mar 28, 2024
77d4f7a
fixed #7366: Handle image save exception
Jaex Mar 28, 2024
a92bafb
Code refactoring
Jaex Mar 28, 2024
a993f1b
Added "Update channel" option
Jaex Apr 2, 2024
8b96a53
Added WinGet manifest
Jaex Apr 2, 2024
5e317dc
fixed #7305: Improve icon detection in quick task menu
Jaex Apr 3, 2024
2dc5f2d
Code refactoring
Jaex Apr 3, 2024
4ad345f
Ignore mouse wheel input
Jaex Apr 6, 2024
5ebce2f
Scrolling capture improvements
Jaex Apr 6, 2024
c49d641
Stop scrolling capture on first combine fail
Jaex Apr 7, 2024
0da0fde
Added Directory.build.targets
Jaex Apr 10, 2024
b6f9fbc
Added scrolling capture status indicator
Jaex Apr 11, 2024
8eb08c4
fixed #7389: Fix DefineConstants
Jaex Apr 11, 2024
cbad9a4
Code refactoring
Jaex Apr 11, 2024
2368639
Add option to set background color for CutOut tool
Apr 12, 2024
acfe90f
Remove extraneous brace causing build error (where did that come from??)
Apr 12, 2024
fc4cead
Match source formatting: remove newline at end of file
Apr 12, 2024
4012835
Cleanup / PR feedback
Apr 12, 2024
452e69e
Added help button to scrolling capture form
Jaex Apr 14, 2024
2328863
Merge pull request #7390 from flmbray/add-cutout-background-color
Jaex Apr 17, 2024
bd3a00e
Include host manifest files in app folder
Jaex Apr 17, 2024
59e7450
Added "Enable browser extension support" option to setup
Jaex Apr 18, 2024
019c9a7
Code refactoring
Jaex Apr 20, 2024
94e5720
Use googleapis.com/auth/drive.file scope
Jaex Apr 22, 2024
40530d9
Update FFmpeg to 7.0
Jaex Apr 23, 2024
4ad4b5c
Update FluentFTP
Jaex Apr 23, 2024
39bba4d
Update version
Jaex Apr 23, 2024
40f546d
fixed #5728: Added "Background dim strength" region capture option
Jaex Apr 28, 2024
34b23fc
Fixed Discord image scaling
Jaex Apr 28, 2024
47bc35b
Fixed active window screen recording file naming
Jaex May 2, 2024
ff15620
Improve downloader progress text
Jaex May 5, 2024
ff4cfb2
Release 16.1.0
Jaex May 9, 2024
0f96099
Update version
Jaex May 9, 2024
6fb3a78
While scrolling capturing ignore 50px bottom
Jaex May 16, 2024
6ffac8a
Added "Auto ignore bottom edge" option
Jaex May 24, 2024
f5b8239
Added "Copy" button
Jaex May 29, 2024
c442fad
NuGet update
Jaex Jun 3, 2024
f04cf8a
fixed #7422: Fixed image editor toolbar position
Jaex Jun 3, 2024
9c927b6
Code refactoring
Jaex Jun 15, 2024
9618505
Fixed setup
Jaex Jun 15, 2024
df0d0eb
Update version
Jaex Jun 20, 2024
c87c3f6
fixed #6015: Allow restoring borderless window
Jaex Jun 25, 2024
7d1724e
Added "Make active window borderless" hotkey
Jaex Jun 25, 2024
326199f
Added notification sound
Jaex Jun 26, 2024
ec232b8
Added notification sound to "Pin to screen" tool
Jaex Jun 26, 2024
afd0006
Added notification sound to "Screen color picker" tool
Jaex Jun 26, 2024
fccb1ca
Added notification sound to "Borderless window" tool
Jaex Jun 26, 2024
a6222b7
Added notification sound to browser extension action
Jaex Jun 28, 2024
b80fa0d
Added "Make active window top most" hotkey
Jaex Jun 28, 2024
196d806
Update README.md
Jaex Jun 30, 2024
6f15538
Update README.md
Jaex Jul 3, 2024
0cd5d1a
Added "Pin to screen (Close all)" hotkey
Jaex Jul 6, 2024
5971817
Added notification sound to screen recording stop/pause/abort actions
Jaex Jul 13, 2024
d42fbba
When "DisableUpload" registry is set, hide upload related items in ma…
Jaex Jul 14, 2024
0c03d01
Update russian translation
L1Q Jul 15, 2024
002854c
Merge pull request #7525 from L1Q/develop
Jaex Jul 15, 2024
a727678
Update alpha offset for Windows 11
Jaex Jul 15, 2024
d55e94d
Code refactoring
Jaex Jul 16, 2024
fd5e79e
Added "Play sound after action is completed" and "Use custom action c…
Jaex Jul 16, 2024
97c2382
fixed #7073: Allow disabling OCR notification
Jaex Jul 16, 2024
f318cca
Translated missing DE strings
iDazai Jul 17, 2024
a05ddac
Translated strings, fixed strings
iDazai Jul 19, 2024
b4f8fc2
Added notification sound to silent OCR action
Jaex Jul 19, 2024
38a02cc
#7073: Removed toast notification from silent OCR action
Jaex Jul 19, 2024
773f74e
translated DE strings, fixed some strings
iDazai Jul 20, 2024
861abc9
Merge branch 'ShareX:develop' into develop
iDazai Jul 20, 2024
8f23b55
Removed "DisableNotifications" option
Jaex Jul 23, 2024
0894ca7
Merge pull request #7532 from iDazai/develop
Jaex Jul 28, 2024
6ddb37f
Also hide upload related items from after capture tasks menu
Jaex Jul 29, 2024
9df562f
Fixed registry issue
Jaex Aug 8, 2024
40fc9da
Make forms localizable
Jaex Aug 12, 2024
0ea1e0a
Update zh-TW localization
candela97 Aug 11, 2024
5cfa14a
Save tasks to history regardless of failed or stopped upload
Jaex Aug 13, 2024
1e67f2e
Added notification sound to "Disable/Enable hotkeys" action
Jaex Aug 13, 2024
9f22549
Merge pull request #7562 from candela97/i18n-zhtw2
Jaex Aug 13, 2024
6673e96
Update version
Jaex Aug 13, 2024
81a8066
Fix image not being inserted in center when zoom level is changed
xPaw Aug 29, 2024
7ed3dc2
Removed YouTube icon because Google not allows us to use 16x16 size logo
Jaex Aug 30, 2024
e5b9fdd
Merge pull request #7580 from xPaw/fix-7579
Jaex Aug 30, 2024
ec3ce9c
Code refactoring
Jaex Sep 13, 2024
9ed724d
Add files via upload
OthmanAliModaes Sep 28, 2024
8e3a083
Merge pull request #7616 from OthmanAliModaes/develop
Jaex Oct 3, 2024
9024c03
Line ending changes
Jaex Oct 3, 2024
871c220
Update Resources.ar-YE.resx
Jaex Oct 3, 2024
082a25f
#7616: Added Arabic language
Jaex Oct 8, 2024
b631fb4
Removed Google Photos image uploader
Jaex Oct 13, 2024
69ca58c
NuGet update
Jaex Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use different TrimShadow alpha offset in Windows 11
  • Loading branch information
Jaex committed Sep 2, 2023
commit 38cfc1e6a9eb78322d1b6c90c596a61b45153032
6 changes: 6 additions & 0 deletions ShareX.HelpersLib/Helpers/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,12 @@ public static bool IsWindows10OrGreater(int build = -1)
return OSVersion.Major >= 10 && OSVersion.Build >= build;
}

public static bool IsWindows11OrGreater(int build = -1)
{
build = Math.Max(22000, build);
return OSVersion.Major >= 10 && OSVersion.Build >= build;
}

public static bool IsDefaultInstallDir()
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
Expand Down
26 changes: 14 additions & 12 deletions ShareX.ScreenCaptureLib/Screenshot_Transparent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,20 @@ public Bitmap CaptureWindowTransparent(IntPtr handle)
return CaptureWindow(handle);
}

Thread.Sleep(10);
Application.DoEvents();
Thread.Sleep(10);

whiteBackground = CaptureRectangleNative(rect);

form.BackColor = Color.Black;
Application.DoEvents();
Thread.Sleep(10);

blackBackground = CaptureRectangleNative(rect);

form.BackColor = Color.White;
Application.DoEvents();
Thread.Sleep(10);

whiteBackground2 = CaptureRectangleNative(rect);

Expand Down Expand Up @@ -204,20 +206,20 @@ private Bitmap CreateTransparentImage(Bitmap whiteBackground, Bitmap blackBackgr

private void TrimShadow(Bitmap bitmap)
{
int sizeLimit = 10;
int alphaLimit = 200;
int cornerSize = 10;
int alphaOffset = Helpers.IsWindows11OrGreater() ? 50 : 200;

using (UnsafeBitmap unsafeBitmap = new UnsafeBitmap(bitmap, true))
{
for (int i = 0; i < sizeLimit; i++)
for (int i = 0; i < cornerSize; i++)
{
int y = i;
int width = bitmap.Width;

// Left top
for (int x = 0; x < sizeLimit; x++)
for (int x = 0; x < cornerSize; x++)
{
if (unsafeBitmap.GetPixel(x, y).Alpha < alphaLimit)
if (unsafeBitmap.GetPixel(x, y).Alpha < alphaOffset)
{
unsafeBitmap.ClearPixel(x, y);
}
Expand All @@ -228,9 +230,9 @@ private void TrimShadow(Bitmap bitmap)
}

// Right top
for (int x = width - 1; x > width - sizeLimit - 1; x--)
for (int x = width - 1; x > width - cornerSize - 1; x--)
{
if (unsafeBitmap.GetPixel(x, y).Alpha < alphaLimit)
if (unsafeBitmap.GetPixel(x, y).Alpha < alphaOffset)
{
unsafeBitmap.ClearPixel(x, y);
}
Expand All @@ -243,9 +245,9 @@ private void TrimShadow(Bitmap bitmap)
y = bitmap.Height - i - 1;

// Left bottom
for (int x = 0; x < sizeLimit; x++)
for (int x = 0; x < cornerSize; x++)
{
if (unsafeBitmap.GetPixel(x, y).Alpha < alphaLimit)
if (unsafeBitmap.GetPixel(x, y).Alpha < alphaOffset)
{
unsafeBitmap.ClearPixel(x, y);
}
Expand All @@ -256,9 +258,9 @@ private void TrimShadow(Bitmap bitmap)
}

// Right bottom
for (int x = width - 1; x > width - sizeLimit - 1; x--)
for (int x = width - 1; x > width - cornerSize - 1; x--)
{
if (unsafeBitmap.GetPixel(x, y).Alpha < alphaLimit)
if (unsafeBitmap.GetPixel(x, y).Alpha < alphaOffset)
{
unsafeBitmap.ClearPixel(x, y);
}
Expand Down