patrickjane / ut-passes

Access .pkpass passes on Ubuntu Touch
MIT License
4 stars 4 forks source link

QR Code Crops when too huge #11

Open S60W79 opened 5 months ago

S60W79 commented 5 months ago

In case of too huge QR Codes, the Image gets croped, so that the code might not be readable anymore. As far as I understand that you can fix that, by adding fillMode to the Image property and set it to Image.PreserveAspectFit. That should scale the image in the right way. I am sorry I didn't test, but I guess you have a better test environment (;

Danfro commented 3 months ago

This solution is not that easy. When applying fillMode: Image.PreserveAspectFit to the image the barcode comes up as square, not rectangular. I guess because the size is given square here.