Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create png image from QRCode for iPhone

I've been using zxing to decode QRCodes. I've also now the got the encoder working and can create the QRCode which contains the encoded data.

I'm asking if anyone knows how to convert this QRCOde data to a png image.

like image 203
Chris Baxter Avatar asked May 22 '11 10:05

Chris Baxter


1 Answers

If your app has online access then you can use something like http://www.tag.cx/qr-codes/

Many users are looking for a way to encode QR codes and other codes programmatically on the iPhone. These features have not been ported from Android to iPhone yet as described in this Zxing thread: https://groups.google.com/group/zxing/browse_thread/thread/7325ed13cc49122c/aba6f4545c5c3583?lnk=gst&q=encode+to+png+iphone#aba6f4545c5c3583

Please see this question for further discussion: Generate 2D bar code (e.g. QR Code, Data Matrix, PDF417) on iPhone and Android

You can use Phonegap to encode a QR barcode using the plugin here. Follow the instructions and you should be successful.

The Javascript is simple, taken straight from https://github.com/phonegap/phonegap-plugins/

   window.plugins.barcodeScanner.encode(BarcodeScanner.Encode.TEXT_TYPE, "http://www.nytimes.com", function(success) {
    alert("encode success: " + success);
  }, function(fail) {
    alert("encoding failed: " + fail);
  }, {yesString: "Install"}
);
like image 88
Chris Truman Avatar answered Nov 20 '22 09:11

Chris Truman