When I crop a bitmap from an image, the clarity of the cropped bitmap is reduced. How to bring the original clarity of the bitmap when cropping
temp = temrary bitmap image varas.ptval = orignal image
Bitmap temp; Bitmap croped; Rectangle rectangle = new Rectangle(); rectangle.Height = varas.Rect_H; rectangle.Width = varas.Rect_W; rectangle.X = varas.Rect_X; rectangle.Y = varas.Rect_Y; temp = varas.ptval; croped = cropBitmap(temp, rectangle); varas.RGBcrop = croped; croped.Save(paths + "\\" + "SPR_" + ".jpeg", ImageFormat.Jpeg);
static public Bitmap cropBitmap(Bitmap bitmap, Rectangle rectangle) { Bitmap cropped = bitmap.Clone(rectangle, bitmap.PixelFormat); return cropped; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)