QRcode thingy using SquidDev's ImagesAPIProof of concept.
What we wanna do:
Generate a QR-code image
upload it as BMP to the web
Ingame generate a CC image using the BMP from the web
I decided to strip my develop code to show a working example.NOTE: My script is not intended as a release but ONLY as proof of concept!.
BTW: I would be happy if someone else take it from here. Because i hate QR images and do not even have a QR scanner (smartphone). So i am not going to develop the script further! :)/>
If you either display the generated qr-image ingame as and image or build it from black and white blocks you can take a picture with your very smart smartphone and it can read the code!
——————————————————————-
How to test :
Navigate to:
https://www.the-qrcode-generator.com/Generate your QRcode
Make shure it is generated with no margin and one 'dot' equals one pixel as shown in this image:
Save the image to your computer
I got this image:
Open the image in photoshop
Crop it removing 'whitespace' so you end up with a picture like this:
Convert to greyscale
Save as .BMP (windows/8 bit)
Here is my bmp:
http://dl.dropboxuse...d/qr/qrcode.bmpUpload the image to the web
Enter Minecraft and:Fetch a copy of SquidDev's ImagesAPI
pastebin get Y3JeZWzV ImagesAPI
Fetch my script:
pastebin get bGWZ5uvF qr
Run qr with 2 arguments:
1 = the URL to the BMP image
2 = What savename you want to use (maybe use xxxx.bmp to avoid confusion later on)
NOTE: If not supplying any arguments to qr it will use default data (see inside script).
Result:A text file named [savename].image
——————————————————————-
Voila!
Tested in CCLite and SP. (I use ComputerCraft1.64pr2 on MC 1.7.2)
I only have access to a multiplayer server with an old CC (ComputerCraft1.58) version and the image did not download correct. But i am kind of shure it works if using latest CC build!
Please post if it works on a multiplayer server with latest CC build. I will be very happy to get feedback.
Finally use the resulting image to display or get a turtle to 'build' the picture
/sEi