Open arunkush opened 4 years ago
Agreed with the second issue of picture quality, but first issue I never experienced.
What I can do for picture quality.
On Sun, 18 Oct, 2020, 7:27 pm Jhansi Karee, notifications@github.com wrote:
Agreed with the second issue of picture quality, but first issue I never experienced.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jhansireddy/AndroidScannerDemo/issues/133#issuecomment-711171590, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7UKM7HWKEKMA25BID2S63SLLX4LANCNFSM4QLXCQKA .
In Case , Your Image is Simply getting cropped then just change the following things :
In ScanFragment.java
change method
private Bitmap scaledBitmap(Bitmap bitmap, int width, int height){
Matrix m = new Matrix();
m.setRectToRect(new RectF(0, 0, bitmap.getWidth(), bitmap.getHeight()), new RectF(0, 0, width, height), Matrix.ScaleToFit.CENTER);
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), m, false);
}
to :
private Bitmap scaledBitmap(Bitmap bitmap, int width, int height){
return Bitmap.createScaledBitmap(bitmap,width,height,false);
}
@arunkush @jhansireddy did you got resolution of improving image quality?
Hello When I click the image and crop it which part i have crop that not showing in the app some different part show the app.