AndroidScannerDemo icon indicating copy to clipboard operation
AndroidScannerDemo copied to clipboard

Picture is not clear and cropping problem

Open arunkush opened this issue 5 years ago • 4 comments

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. 2. when i save the picture and check it again it is not clear how i can in create picture quality.

arunkush avatar Aug 26 '20 11:08 arunkush

Agreed with the second issue of picture quality, but first issue I never experienced.

jhansireddy avatar Oct 18 '20 13:10 jhansireddy

What I can do for picture quality.

On Sun, 18 Oct, 2020, 7:27 pm Jhansi Karee, [email protected] 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 .

arunkush avatar Oct 18 '20 16:10 arunkush

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

OmkarSsawant avatar Feb 10 '21 08:02 OmkarSsawant

@arunkush @jhansireddy did you got resolution of improving image quality?

ashwinjawale24 avatar May 22 '21 11:05 ashwinjawale24