mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
If all pixels same color then return
This commit is contained in:
parent
004b74b198
commit
ec9f9e6bf2
1 changed files with 7 additions and 1 deletions
|
@ -1671,6 +1671,12 @@ public static Rectangle FindAutoCropRectangle(Bitmap bmp, bool sameColorCrop = f
|
|||
}
|
||||
}
|
||||
|
||||
// If all pixels same color
|
||||
if (!leave)
|
||||
{
|
||||
return crop;
|
||||
}
|
||||
|
||||
leave = false;
|
||||
|
||||
if (!sameColorCrop)
|
||||
|
@ -1739,7 +1745,7 @@ public static Rectangle FindAutoCropRectangle(Bitmap bmp, bool sameColorCrop = f
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// If auto crop rectangle and source image rectangle is same then null will be returned.
|
||||
/// If crop rectangle and source image rectangle is same then null will be returned.
|
||||
/// After auto crop, source image will be disposed.
|
||||
/// </summary>
|
||||
public static Bitmap AutoCropImage(Bitmap bmp, bool sameColorCrop = false)
|
||||
|
|
Loading…
Reference in a new issue