Unable to decode QRCode with jsqr NodeJS

Viewed 388

I am using the following code to decode qrcodes using the jsqr library. I am able to decode simple qrcodes that I have generated from various sites. However, I am unable to decode more complex qrcodes like the attached and null result is returned. I am able to decode this qrcode with a free Android app. What do I need to do to decode this qrcode?

    it.only('test divic qrcode jsQR', async () => {
        await Promise.resolve();

        const buffer = fs.readFileSync(`${__dirname  }/test.png`);
        const image = await Jimp.read(buffer);

        const qrCodeImageArray = new Uint8ClampedArray(image.bitmap.data.buffer);

        const code = jsQR(
            qrCodeImageArray,
            image.bitmap.width,
            image.bitmap.height
        );

        console.log("Found QR code", code);

    });

enter image description here

Edit:

The contents of the qrcode is in a compressed format using jszip. This is what I was able to decode using a random Android qrcode reader app from the play store

PK
ŠiÞRØ)E è Ù certificate.json Tioê: ý+(Ÿ f Jùr „²ïa zª&‰ À¦Ž
Uÿû ·´Rß"E‘<s<Ë™3~×þð8“äMj•?µ ”‡¸òðp< óG+ÏEø`êFùÁ Ä'LRØÅ ©¡e? ?R– yš§ì;
< 2 ”3u㯬&O ¢r̉ wGìO<F    ΃a0¿ßûâÆë4Ž "´ÊÏ©µ+ ˜Gê 1 fꦑÓK9KŸê…Š®ã—×u} HÆÙT ‹ "T –"!è¸7à$nD<ääýV·6""æLåññäS¿rËžP h Àß ˆŠi ð³,«€PA‚¶B h*©Ä°W¡j 8A¦O¥ 4†„ù—Æú°SE@x)ÿñ‚W<ÀŽÊ šÚ̧ * ß $ŽUq± „ÈêoƒfèFÎÐÍl¦ ,„]¦ o¨8‚ ·¾AMÄ:™yfÂ/>Ÿ¢—ª~5 ˜ O$çÌ‚ÄR‘rÍÞOö.Ð{ö      ±¶KÙ o®Ýܼ6O˜ —ª h=ðXÂÎæ¾j­€c( ´ ¬FRŠ„{J ïWb œîULDM9 ÄwÁÛÎÄîŸÐ¿Ô XÀÿ ò©Ç»â”Î\ ÞFµUÃI–kKDÞ񣄾sxCË X €' q™œ=œ „½"À¿ËO/Y:ZH ”hJ   B^}º ¿¯¾ Ênwõ o>ŸÇ*’Z7É‘¾:žã›!½,‘Jþþ[U ç ¢ŒCY¸Ñ [¬ ^•ó  ©ÖìLŸøÔCeØ(t¼ÿïj2­l¦‹a÷ 5ÁO*ú®ž QÀD$ ‡'rs—ϧã uA ÿ°ýŸúAå|à êÁø² “ b Šz´®ûŒÓð¿¿ †U1ÌŠyy  ®4z—á÷‰Üðûnã®i·$£D ®³€8&â 8«EGE 9u6nÓ£CÚ ÏÎmc@Ûq{ß6 v»´Þ7bÏœáyp‚å˜ w1]E+½½3žòù™ÿÊW½·5xƒÂs¹S{êO·ërgÛë.K,4ç ólñº<V“`î%ro "k±~zõº¹z=b²XöŸÓ—£áÛ, §¡ûÂÚõ {® ]½Ô,Ÿ[ËY¡ TWæK# 3½t '6 .»U$·®{¸Fnk;
å\‹wžÜ·×u,JƒEd aµ1Z yîÐêy;KzFÐhºQ
|v
çi59®h¹Yï 7S§ž¶‹§Õ㢠¥ÕÜ3G‹ÒÒZøµpäå^C äc:éMKåç¨4›öÂck¥—É&‰ AIÚ³úÀ 4ƒiÐnÉ Oìí0,ZüÅ}z,ÏíÖÉy$‹åv<öÃãºÉ ¦;?E sd4'

; ‡NÍq¬Ð¬ ’¥áô"˜ 'c”ÈßPK
ŠiÞRØ)E è Ù certificate.jsonPK >
0 Answers
Related