# Help! My avatar is covered in puzzle

I accidentally dropped my avatar in puzzle, and now it has puzzle all over it!

Hint:

The disguise is defined by black and white.
Eyes are recognized but the face is forlorn.
Nothing to be found except a pattern of form.
Fruition is unveiled on the colorful side.

• Thank you for putting a bounty on this @Swati Aug 23, 2020 at 14:03

Next steps to complete the answer after solving the nonogram

At time of writing, @iBug's answer gets as far as

speculation that the lower right corner may be part of a QR alignment mark where some data has been cropped out.

It is noteworthy that

A full QR code including an alignment marker of this type must be at least "version 2", which is 25x25 modules (pixels), and could theoretically be any larger square size that is congruent modulo 4. For smaller QR codes (up to 41x41), the size is implicit, and the "version information" is not separately encoded, so we will have to guess whether we're trying to reconstruct a 25x25, 29x29, or even a larger matrix.

One additional piece of information is

The blue cells in this position

This indicates

a bit pattern of 00101... for the "final format string", which indicates the error correction level used and the mask pattern used for the data. Only the first 5 bits are relevant, the remainder are for error correction.
In a full QR code, the "final format string" (per reference linked above) would be generated by XOR of the format string with '101010000010010', so the implied format string would have started '10000', however, it has been confirmed that this step was skipped when creating this puzzle, so the format code '00101' should be used instead.
These 5 bits break down into two parts:

• 10 - corresponds with Error Correction Level 'H' (Recovers 30% of data)
00 - could correspond with a different error correction level, or mean "not relevant to this puzzle".

• 000 - corresponds with mask pattern 0, where data bits are flipped if '(row + column) mod 2 == 0' - a simple checkerboard pattern.
101 - corresponds with mask pattern 5, mathematically "((row * column) mod 2) + ((row * column) mod 3) == 0" - visually will be shown below...

I had two three basic sequences of steps to take this further.

The first I tried was to

regenerate the "missing" elements of a valid QR code, and to point my smartphone at it. It certainly tried very hard to interpret this:
- or -
... where I'd added the missing elements of a QR code including the timing lines and error correction bits for the format code, with the data positioned as had been previously speculated based on the partial alignment marker.
This was unsuccessful for reasons that will be obvious in a moment.
It was in any case clear that there was not enough valid data here, as far more than the max 30% that the error correction could handle was missing, but it was not clear how to "shrink" it, because any smaller (lower "version") image would have required figuring out where to move the data that then overlaps with the fixed elements of the QR code.

A different path was more useful:

• Assume we're not even trying to reconstruct a QR code at all, with the immediately-recognisable QR code elements being merely to hint at the encoding scheme in use for the payload.

• Per @Berry comment that an encoding step was missed because "it was easier that way", it suggests that the bit pattern was generated manually rather than being cropped from a valid QR as we'd assumed.

There are two possible mappings

of the 4 colours to two - either treat "black or green" as a 1-bit and "white or blue" as a 0-bit, or "green or blue" as a 1-bit and "black or white" as a 0-bit.

The next step is

to XOR with mask 5 which looks like this:

(I previously wasted some time as I'd mis-scanned the QR mask table, and picked up the definition for mask 4 which is a large checkerboard).

which results in the following:

The image on the left

has solid lines where the red arrows had been pointing on the original puzzle grid. These lines appear to serve as a "check" for correct decoding up to this point, so can be removed.

Decoding data

was completely unnecessary.

The QR hint was merely to tell us what kind of operation to use to recover the original image.
We just needed to XOR with mask 5.

Therefore the original avatar looked something like this:

- or -
which resembles a strawberry.

For something a little more colourful, I'd suggest this:

where "green" has been kept as per puzzle for the main details, but I filled in the middle with "red" to make it look prettier. This fits nicely with the puzzle setter's username of 'Berry'.

Post-script: looking elsewhere on the stackexchange network,

@Berry has an avatar that has not been "covered in puzzle", and which looks remarkably similar to the decoded image before I gave a different colour suggestion.

• Excellent progress! Let's just say that I did not do the "XOR with 101010000010010"-step. I thought it was easier that way because it's something rarely indicated well by visual explanations of qr-codes. What mask do you get then? Almost there! Aug 23, 2020 at 20:38
• Perfect solution! Thanks for solving my puzzle. You drew all the right conclusions. Indeed the qr was merely to hint the mask. I do understand it was a bit confusing and was a bit afraid people would get cought up in the spec too much. But I think the progress everyone made was quite steady. You even found the cross-site explanation for the image! Well done! Aug 24, 2020 at 14:38
• I also love your colored version ;) Aug 24, 2020 at 14:45
• @Berry just curious - was the false trail from the pattern in the corner intentional? Aug 25, 2020 at 7:01
• Hi, nice answer . I like images which you have posted :D Congrats for bounty . Aug 27, 2020 at 4:25

Nonogram:

The next part involves a bit of wild guessing:

Remove all greens, it's a QR code

Notice how the green grids on the bottom-right corner looks like an alignment?

Still trying to find out how to continue from this point...

• Sadly removing all the greens doesn't give a valid QR Aug 19, 2020 at 19:10
• However, the blue and black squares almost form valid position indicators and timing lines - except for the blue dots outside of the squares, and the misplaced smaller indicator. The green dots appear to represent QR data. Perhaps the blue dots represent collision of the green data overlaid on the black dots? But how do we arrange that data properly? And what about the scattered blue dots? Hmm... Aug 19, 2020 at 22:11
• The grid is 17x17, but the minimum valid QR code is 21x21, and each size (version) above that is a multiple of 4 pixels larger. "alignment pattern" (the small square) would only be present for "version 2" or larger (minimum size 25x25). Up to 30% of the data may be missing completely, depending on the error correction level used. (source thonky.com/qr-code-tutorial/module-placement-matrix and other related pages), but 19x19 / 25x25 is more than 30% loss, so at least some of the missing data must be moved to expanded area or reconstructed. Aug 20, 2020 at 9:02
• @DiputsMonro is asking all the right questions. Aug 20, 2020 at 18:38
• @Steve What exactly to do you mean by moving the missing data to the expanded area? I do think the blue + green squares represent QR data, and given that it overlaps the position indicators, they, or the indicators, need to be shifted to form a valid QR code. But where do we shift them to, and what final QR size are we targeting? I wonder of the floating blue dots are somehow relevant to answering that question. Aug 20, 2020 at 21:55