mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 05:23:24 -07:00
Fix for Bug #3038512, only solving the symptom not the problem.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@795 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
3f2826cb0e
commit
32182ea348
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ namespace Greenshot.Helpers {
|
|||
/// <param name="cropRectangle">Rectangle with bitmap coordinates, will be "intersected" to the bitmap</param>
|
||||
public static void Crop(ref Image image, ref Rectangle cropRectangle) {
|
||||
Image returnImage = null;
|
||||
if (image != null && image is Bitmap) {
|
||||
if (image != null && image is Bitmap && ((image.Width * image.Height) > 0)) {
|
||||
cropRectangle.Intersect(new Rectangle(0,0, image.Width, image.Height));
|
||||
returnImage = (image as Bitmap).Clone(cropRectangle, image.PixelFormat);
|
||||
image.Dispose();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue