12
\$\begingroup\$

Your mission is not so simple. You have to write a program that decodes QR-codes.

There are some things that are not permitted:

  • Making web requests (except http://i.stack.imgur.com/sCUJT.png or http://imgur.com/JUQbo8M)
  • Using any QR code processing library (Or using any external library to do this)
  • Image processing libraries should not be be used to do anything other than loading image, determining its size and reading single pixels from it
  • Using built-in functions to read QR codes
  • Brute forcing

If you use any external files (except QR code file and language libraries), the byte count of those files will be added to your code.

Other rules:

  • Program must be able to read any valid QR code (No error correction is required). You can assume that the maximum size of QR-Code is 10000 pixels.
  • QR code colors are black and white. ((0, 0, 0) and (255, 255, 255) in RGB. Alpha channel is not used, so your program can ignore it.
  • Image file must be saved as PNG or loaded from http://imgur.com/JUQbo8M or http://i.stack.imgur.com/sCUJT.png runtime. (And tricks like using raw txt file with .png file extension are prohibited)
  • QR code decoded content must be outputted to stdout. If your language does not allow this, you can save it to file named qrcode.txt.
  • QR-code format is normal qr-code (not any modification like micro QR code)

This is , so shortest code wins

An example file is here: http://api.qrserver.com/v1/create-qr-code/?color=000000&bgcolor=FFFFFF&data=http%3A%2F%2Fcodegolf.stackexchange.com&qzone=1&margin=0&size=400x400&ecc=L

QR code

\$\endgroup\$

closed as unclear what you're asking by Laikoni, Chris, Stephen Leppik, Brian J, Rɪᴋᴇʀ Nov 30 '17 at 15:17

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ Can we get the Imgur URL for free in our submissions? URL shorteners could be used, and it would be unfair if that would break ties. \$\endgroup\$ – ProgramFOX May 17 '14 at 15:34
  • 2
    \$\begingroup\$ "Using language that haves built-in functionality to read QR codes" so I can't even use the language if I omit all that built-in functionality? \$\endgroup\$ – Martin Ender May 17 '14 at 16:26
  • 2
    \$\begingroup\$ This question needs more information: Which QR code version do we use (all of them?)? Do we need to flip around the diagonal if we can't decode? Will we always have a nice QR-only picture, or will we need to search through a picture that contains a QR code? Which encodings should we support? Will we need to support error handling/error handling modes? \$\endgroup\$ – Zaq May 17 '14 at 19:30
  • 3
    \$\begingroup\$ This is going to be difficult af spec, iso or whatever is called \$\endgroup\$ – gcq May 18 '14 at 19:07
  • 1
    \$\begingroup\$ This was helpful blog.qartis.com/decoding-small-qr-codes-by-hand \$\endgroup\$ – Jerry Jeremiah Sep 25 '14 at 23:43

Browse other questions tagged or ask your own question.