Ridhdhi Vaghani
Ridhdhi Vaghani

Reputation: 1

How to crop bitmap and save with original clarity of image?

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 = temporary bitmap image, 
varas.ptval = orignal image.

This is the result:

enter image description here

my code:

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);

I want such a result:

enter image description here

Upvotes: 0

Views: 83

Answers (0)

Related Questions