Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DailyShana committed Nov 21, 2015
1 parent 4b1db6e commit aa6d1b5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions DataEditorX/Common/MyBitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public static Bitmap Zoom(Bitmap sourceBitmap, int newWidth, int newHeight)
Rectangle srcRect = new Rectangle(0, 0, sourceBitmap.Width, sourceBitmap.Height);
graphics.DrawImage(sourceBitmap, newRect, srcRect, GraphicsUnit.Pixel);
graphics.Dispose();
sourceBitmap.Dispose();
return b;
}
return sourceBitmap;
Expand Down Expand Up @@ -105,7 +104,6 @@ public static Bitmap Cut(Bitmap sourceBitmap, int StartX, int StartY, int cutWid
Rectangle srcRect = new Rectangle(StartX, StartY, cutWidth, cutHeight);
graphics.DrawImage(sourceBitmap, cutRect, srcRect, GraphicsUnit.Pixel);
graphics.Dispose();
sourceBitmap.Dispose();
return bitmap;
}
return sourceBitmap;
Expand Down
2 changes: 2 additions & 0 deletions DataEditorX/Core/TaskHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public void ToImg(string img, string saveimg1, string saveimg2)
saveimg1, imgSet.quilty);
MyBitmap.SaveAsJPEG(MyBitmap.Zoom(bmp, imgSet.w, imgSet.h),
saveimg2, imgSet.quilty);
bmp.Dispose();
}
#endregion

Expand Down Expand Up @@ -193,6 +194,7 @@ public void CutImages(string imgpath, bool isreplace)
{
bmp = MyBitmap.Cut(bp, imgSet.normalArea);
}
bp.Dispose();
MyBitmap.SaveAsJPEG(bmp, savejpg, imgSet.quilty);
//bmp.Save(savejpg, ImageFormat.Png);
}
Expand Down
Binary file modified win32/DataEditorX.exe
Binary file not shown.
Binary file modified win32/win32.zip
Binary file not shown.

0 comments on commit aa6d1b5

Please sign in to comment.