alexzhirkevich / custom-qr-generator

Android library for creating QR codes with logo, custom shapes, colors, background image. Powered by ZXing
MIT License
173 stars 18 forks source link

When logo set sometime getting error immutable bitmap passed to Canvas constructor #17

Closed hardikbhalodi closed 1 year ago

hardikbhalodi commented 1 year ago

java.lang.IllegalStateException: Immutable bitmap passed to Canvas constructor at android.graphics.Canvas.(Canvas.java:114) at com.github.alexzhirkevich.customqrgenerator.vector.QrCodeDrawableImpl.createLogo(QrCodeDrawable.kt:547) at com.github.alexzhirkevich.customqrgenerator.vector.QrCodeDrawableImpl.resize(QrCodeDrawable.kt:490) at com.github.alexzhirkevich.customqrgenerator.vector.QrCodeDrawableImpl.setBounds(QrCodeDrawable.kt:131) at android.widget.ImageView.configureBounds(ImageView.java:1299) at android.widget.ImageView.updateDrawable(ImageView.java:1084) at android.widget.ImageView.setImageDrawable(ImageView.java:599)

alexzhirkevich commented 1 year ago

Check is it reproduces in com.github.alexzhirkevich:custom-qr-generator:b8a913a64e

hardikbhalodi commented 1 year ago

com.github.alexzhirkevich:custom-qr-generator:b8a913a64e

couldn't fetch it, seems not a valid dependency!

alexzhirkevich commented 1 year ago

Should be fixed in 1.5.7