alexzhirkevich/custom-qr-generator

Logo seems not cropped properly

Closed this issue · 5 comments

Describe the bug
When set logo with Accurate or Natural padding (0.25) and its not cropping correctly and outline visible, also same issue for all shape circle or round rectangle etc. i tired with JPG and PNG logo, issue faced for both.

Versions
Library : '1.6.1'
Android: 13
Screenshot_20230419_113628
Screenshot_20230419_113643

Screenshot_20230419_113721
Screenshot_20230419_113704

Try 8b2a97c5e6 snapshot

Seem its fixed in 8b2a97c5e6 but when it is drawable its look strange check the images but after generate bitmap all good

BITMAP OUTPUT GOOD
Screenshot_20230419_135925

DRAWABLE OUTPUT (Sometime good )
Screenshot_20230419_135539

Only after 8b2a97c5e6 or it was before too?

Before too!, i tried in 1.6.1 same and got same out put

This happening when i am setting logo from phone gallery and convert selected Bitmap to Drawable using below code

Drawable d = new BitmapDrawable(getResources(), bitmap); <=== issue when using this

But i change to this code and all good now.

Drawable d = RoundedBitmapDrawableFactory.create(context.getResources(),
bitmap); < === This code fixed the drawable issue.