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

GIF Support #8

Closed hardikbhalodi closed 1 year ago

hardikbhalodi commented 1 year ago

is it possible to add GIF image as foreground of QR Code?

alexzhirkevich commented 1 year ago

Gif animation is not supported. You can set 1 frame from gif as a foreground.

hardikbhalodi commented 1 year ago

is it possible to implement with use of gif drawable lib here https://github.com/koral--/android-gif-drawable ?

alexzhirkevich commented 1 year ago

It is technically possible, but what exactly means "foreground of the QR code"?

1st or 2nd? or even something else?

hardikbhalodi commented 1 year ago

Yes the 1st is correct. here is one more example of same, how to achieve that? gif

alexzhirkevich commented 1 year ago

Tbh, your example looks more like 2nd variant.

You can achieve it like this:

LayerDrawable(
    arrayOf(
        QrCodeDrawable(context, data,options),
        GifDrawable(resources, R.drawable.gif).apply {
            alpha = 125
        }
    )
)
hardikbhalodi commented 1 year ago

Okay thanks but not sure how i can export the GIF qr code now because its layer drawable? Any chance to implement GIFDrawableSource?

hardikbhalodi commented 1 year ago

How to customise eyes like this, i tried and able to customise with same shape but all the sides are same! how to differentiate left top, right top and left bottom eye side? unitag_qrcode_standard

alexzhirkevich commented 1 year ago

Please create new issues for different questions