The maximum allowed size on a QR code is 3K, so trying to pass a 4K private key as proposed will cause qrencode to fail:
$ gpg --export 5EA01078| ascii85 | qrencode -8 -o key.png Failed to encode the input data: Input data too large (ps.: I'm using --export, instead of --export-private-key, as I don't have the private key used by the bug report) Yet, we can use "head" command to truncate the size to something that would work. With that in mind, I did the following test with the upstream version of ZBar[1]: 1. ASCII mode: -------------- $ gpg --export 5EA01078| ascii85| head -10 > orig && cat orig | qrencode -8 -o key.png && ./zbarimg/zbarimg --oneshot --raw key.png >parsed && diff -s orig parsed scanned 1 barcode symbols from 1 images in 0.05 seconds Files orig and parsed are identical 2. Binary mode: --------------- $ gpg --export 5EA01078 |head -c 2000 > orig && cat orig | qrencode -8 -o key.png && ./zbarimg/zbarimg -Sbinary --raw --oneshot key.png >parsed && diff -s orig parsed scanned 1 barcode symbols from 1 images in 0.11 seconds Files orig and parsed are identical Summary: -------- On both ASCII and binary mode, the output of the decoded image is equal to the input data. It should be noticed that, without "--oneshot", zbarimg will output a "\n" after the parsed data, as the image may have other codes on it. So, this issue was already solved upstream. [1] available at: https://github.com/mchehab/zbar Thanks, Mauro