this post was submitted on 07 May 2022
0 points (NaN% liked)
Asklemmy
43803 readers
747 users here now
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
- Open-ended question
- Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- !lemmy411@lemmy.ca: a community for finding communities
~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
There are many types of QR code. iirc a single qrcode can contain up to a few kilobytes, but the more data you put in it the more difficult it will be to scan.
so, you could use qrcodes for offline distribution of short text messages or very low resolution images. I think mobile devices' qrcode scanners will display the contents of TEXT type qrcodes, but they probably don't have support for decoding an image from one (so such an app would need to be written). you can create TEXT type qrcodes using the
qrencode
tool (packaged in major linux distros) or using websites like https://www.qr-code-generator.com/ (note that I think only their URL and TEXT types are offline; the others upload a file to their servers and make a qrcode containing a URL for it).This qrcode says "Hello":
This qrcode contains this 88x26 pixel (1467 byte) image:
(created using
cat lemmy.png |base64 |qrencode -o lemmy_qr.png
; can be decoded usingzbarimg lemmy_qr.png |sed 's/QR-Code://'|base64 -d > output.png
. on debian/ubuntu you canapt install qrencode zbar-tools
to get the two required commands.)I didn't know there was an actual limit to the size of a QR code, but as we see a big problem with (raster) images is that the QR code rapidly becomes much more complex than the image itself
Vector images can be a good fit though! If you can fit a URL in there, a SVG could fit in too :)
I agreed a priori, which, as you probably guessed, is exactly why I put that parenthesis ๐ But I think in practice the starting point already is too complex. For example, I opened inkscape and saved the empty image, the result is already more than 1KB. Similarly, Lemmy's very simple logo is already 3KB.
SVGs can be minified after edition, but of course nothing will beat hand-crafted SVGs...