TransparantQR: Difference between revisions

From RevSpace
Jump to navigation Jump to search
(add patch)
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Project
{{Project
  |Name=TransparantQR
  |Name=TransparantQR
  |Picture=Qrtest.png
  |Picture=QrTest2.png
  |Omschrijving=Transparant QR code
  |Omschrijving=Transparant QR code
  |Status=Completed
  |Status=Completed
Line 7: Line 7:
}}
}}


Based on an idea of Zack Freeman [https://twitter.com/zackfreedman/status/1517555638456389632 twitter link], but then with full-color video background possible.
=== Origin ===
 
Based on an idea of Zack Freedman [https://twitter.com/zackfreedman/status/1517555638456389632 twitter link]
 
=== Improvement ===
 
Make it work with a full-color moving video in the back.
* Use same large markers
* Make them a little more transparent (25%)
* With contrast of the large markers, reader will construct lines along which the blocks are sample
* Reduce size of blocks to about 1/9th of original blocksize
* Make everything around the block transparent
* Result: working transparent QR code!
 
Does not work on all readers, zbarimg fails on the PNG, but could be due to PNG alpha
Does not work on all readers, zbarimg fails on the PNG, but could be due to PNG alpha
channel interpreted in the wrong way.
channel interpreted in the wrong way.
=== Resulting code distribution ===
It is a patch to GPL code, so modified source must be published.
For convenience, patch file is encoded in QR as well.
Commit message redacted and reduced, xz compression, and it fits!


Sourcecode patch to libqrencode: (xz compressed patchfile)
Sourcecode patch to libqrencode: (xz compressed patchfile)
[[File:TransparentQRPatch.png|thumb|patch]]
[[File:TransparentQRPatch.png|thumb|patch]]
Additional changes:
Reduce location_ishiconstrast() remove the line 6 tests for even more area, seems to be allowed on most phone-based QR readers.
=== User interface ===
qrencode -o out.png -T insertyoururlorotherdatahere
will output a PNG32 file out.png
=== Building ===
building yourself:
git clone https://git.sr.ht/~cmpxchgable/libqrencode
and follow same instructions as original
=== Sample image ===
Below transparent, PNG32 format file can be overlayed on any graphic and redirects to http://revspace.nl/
[[File:RevspaceTransparentQRLink.png|thumb|RevspaceTransparentQRLink]]

Latest revision as of 20:07, 27 April 2022

Project TransparantQR
QrTest2.png
Transparant QR code
Status Completed
Contact cmpxchg
Last Update 2022-04-27

Origin

Based on an idea of Zack Freedman twitter link

Improvement

Make it work with a full-color moving video in the back.

  • Use same large markers
  • Make them a little more transparent (25%)
  • With contrast of the large markers, reader will construct lines along which the blocks are sample
  • Reduce size of blocks to about 1/9th of original blocksize
  • Make everything around the block transparent
  • Result: working transparent QR code!

Does not work on all readers, zbarimg fails on the PNG, but could be due to PNG alpha channel interpreted in the wrong way.

Resulting code distribution

It is a patch to GPL code, so modified source must be published. For convenience, patch file is encoded in QR as well. Commit message redacted and reduced, xz compression, and it fits!

Sourcecode patch to libqrencode: (xz compressed patchfile)

patch

Additional changes: Reduce location_ishiconstrast() remove the line 6 tests for even more area, seems to be allowed on most phone-based QR readers.

User interface

qrencode -o out.png -T insertyoururlorotherdatahere

will output a PNG32 file out.png

Building

building yourself: git clone https://git.sr.ht/~cmpxchgable/libqrencode and follow same instructions as original

Sample image

Below transparent, PNG32 format file can be overlayed on any graphic and redirects to http://revspace.nl/

RevspaceTransparentQRLink