I would like to modify the data (black square or white square) in a QR code so that to display any graphic feature of my own choice in the code at the expense of sacrificing a certain amount of its redundancy. There are related questions on this site like Generate QR Code with image inside or How to add text into a QR-Code? of the same flavour. If you wish, I am looking for a way to generate a corrupted QR code in TeX.
Is there a QR code latex package which readily has a high-level command to do this, like \setpixel[xcoord=5,ycoord=12,"black"]
?
I add as a clarification, that I am currently experimenting with the recent qrcode
package with the MWE as shown in this thread pgf-Tikz QR code generator, whose very short documentation does not hint a feature like this. But my question is not restricted to this particular package.
Edit:
Well, apparently, more clarification is needed. So, as described above, I am using the following explicit MWE, called test.tex:
\documentclass{article}
\usepackage[]{qrcode}
\begin{document}
\qrcode[]{Dummy code}
\end{document}
The code above compiles fine with pdflatex, and inspection of the compilation output reveals, that pdflatex puts the 0-1 representation of the QR code into the auxiliary file test.aux, as shown below:
\relax
\ifx\qr@savematrix\@undefined\def\qr@savematrix{\begingroup\let\do\@makeother\dospecials\catcode`\{=1\catcode`\}=2\relax \qr@savematrix@int}\def\qr@savematrix@int#1#2#3#4{\endgroup}\fi
\qr@savematrix{Dummy code}{1}{3}{111111100010101111111100000101111101000001101110100111101011101101110101000001011101101110101010001011101100000100110001000001111111101010101111111000000001110000000000010111101000111011010111111011010010001110000010100010110000111001110010000110100100001100101000110111001000000001010001011011111111100101010011100100000101001011011100101110101100000101000101110101011110000000101110100000001110111100000101110011101111111111100011010101000}
So this is the source of the QR code, which I can freely modify anyway I wish, and this is what being transformed to the actual picture. At this point my question boils down to the following: How can I cheat pdflatex to use the 0-1 string of my choice, and not the one which is automatically generated by the qrcode package and pdflatex? To specify the question, I am using TeXnicCenter under Windows, and I am clicking a button to have the latex source compiled (no fancy command-line stuff).
One naive way to do this is to carefully place white or black squares on the top of the QR code image, but this is really not something I am looking for.
Until now I was generating my QR codes with any of the readily available free online programs. Then, as hinted by this not-too-in-depth Explanation of QR codes (YouTube), based on the generated image I manually recoloured certain cells in a spreadsheet (say Excel), and then got an image by saving the contents of the screen. There should be clearly more efficient (and reliable!) ways to do this.
Related: LaTeX Package to generate QR codes?