How do I crop the bitmap and save it in its original quality? Height of bitmap should be 592 and width 699
Loading
How do I crop the bitmap and save it in its original quality? Height of bitmap should be 592 and width 699
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Feb 9, 2023, 8:16 AM
Hello Riddhi,
Please refer below link:
https://learn.microsoft.com/en-us/dotnet/desktop/winforms/advanced/how-to-set-jpeg-compression-level?view=netframeworkdesktop-4.8
Thanks
Naimish Makwana
Kip HackmanPosted Feb 8, 2023, 5:10 PM
You can use LEADTOOLS Imaging Pro SDK technology in your application.
https://www.leadtools.com/sdk/products/imaging-pro
You can leverage the CropCommand class, which will allow you to take the points you have and crop your image. When you use the CropCommand, the quality(DPI) of the image will not change. See the sample code below:
Deepak TewatiaPosted Dec 20, 2022, 8:49 AM
Hi Ridhdhi,
Based on your peoblem statement, use the below steps:-
try to use below code to solve your problem:
It will load the original bitmap then create a new bitmap that is the same size as the crop rectangle then draw the cropped image onto the new bitmap and then save the new bitmap to a file. The resulting image will be the same quality as the original because it is simply a copy of a portion of the original image.
Thanks
NitinPosted Dec 20, 2022, 5:25 AM
Hi Ridhdi vaghani
check this URL- https://www.codeproject.com/Questions/5349954/How-to-crop-bitmap-and-save-with-original-clarity