Commit f759710e authored by keyongyu's avatar keyongyu

fix

parent d21714d9
...@@ -48,6 +48,7 @@ public static Bitmap Zoom(Bitmap sourceBitmap, int newWidth, int newHeight) ...@@ -48,6 +48,7 @@ public static Bitmap Zoom(Bitmap sourceBitmap, int newWidth, int newHeight)
Rectangle srcRect = new Rectangle(0, 0, sourceBitmap.Width, sourceBitmap.Height); Rectangle srcRect = new Rectangle(0, 0, sourceBitmap.Width, sourceBitmap.Height);
graphics.DrawImage(sourceBitmap, newRect, srcRect, GraphicsUnit.Pixel); graphics.DrawImage(sourceBitmap, newRect, srcRect, GraphicsUnit.Pixel);
graphics.Dispose(); graphics.Dispose();
sourceBitmap.Dispose();
return b; return b;
} }
return sourceBitmap; return sourceBitmap;
...@@ -104,6 +105,7 @@ public static Bitmap Cut(Bitmap sourceBitmap, int StartX, int StartY, int cutWid ...@@ -104,6 +105,7 @@ public static Bitmap Cut(Bitmap sourceBitmap, int StartX, int StartY, int cutWid
Rectangle srcRect = new Rectangle(StartX, StartY, cutWidth, cutHeight); Rectangle srcRect = new Rectangle(StartX, StartY, cutWidth, cutHeight);
graphics.DrawImage(sourceBitmap, cutRect, srcRect, GraphicsUnit.Pixel); graphics.DrawImage(sourceBitmap, cutRect, srcRect, GraphicsUnit.Pixel);
graphics.Dispose(); graphics.Dispose();
sourceBitmap.Dispose();
return bitmap; return bitmap;
} }
return sourceBitmap; return sourceBitmap;
......
No preview for this file type
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment