从iPhone的QRCode创建png图像 [英] Create png image from QRCode for iPhone
问题描述
我一直在使用zxing解码QRCode.我现在也使编码器正常工作,并且可以创建包含编码数据的QRCode.
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.
我在问是否有人知道如何将QRCOde数据转换为png图像.
I'm asking if anyone knows how to convert this QRCOde data to a png image.
推荐答案
如果您的应用具有在线访问权限,则可以使用 http://www.tag.cx/qr-codes/
If your app has online access then you can use something like http://www.tag.cx/qr-codes/
许多用户正在寻找在iPhone上以编程方式对QR码和其他代码进行编码的方法.尚未按照此Zxing线程中的说明将这些功能从Android移植到iPhone:
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
请参阅此问题以进行进一步讨论: 生成2D条码在iPhone和Android上(例如QR码,数据矩阵,PDF417)
Please see this question for further discussion: Generate 2D bar code (e.g. QR Code, Data Matrix, PDF417) on iPhone and Android
您可以在插件此处中使用Phonegap对QR条码进行编码.按照说明进行操作,您应该会成功.
You can use Phonegap to encode a QR barcode using the plugin here. Follow the instructions and you should be successful.
JavaScript很简单,直接从> https://github.com/phonegap/phonegap-插件/
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"}
);
这篇关于从iPhone的QRCode创建png图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!