Re: [請益] QR code image generator and decoder

看板PHP作者 (.撥雲見日.)時間11年前 (2013/05/21 13:21), 編輯推噓2(207)
留言9則, 4人參與, 最新討論串2/2 (看更多)
兩種做法: 1.Google Api $url = urlencode("1234"); $image = imagecreatefrompng("http://chart.apis.google.com/chart?cht=qr&chs=120x120&chl=$url"); imagepng($image, "file.png"); $pdf->Image("file.png", 56, 3 , 8, 8); 用google api產生圖檔套PDF 2.用套件(QRcode或barcode套件)產生 $url = urlencode("TEST 1234"); $image = imagecreatefrompng("http://localhost/barcode/html/image.php?code=code39&o=1&t=30&r=1&f=2&a1=&a2=&text=$url"); imagepng($image, "file.png"); $pdf->Image("file.png", 52, 3 , 12, 6); 在local端用套件產生圖檔套PDF Barcode:http://codeslibrary.net/sc.php?id=7613&code=Barcode%20Generator QRcode:http://phpqrcode.sourceforge.net/#home -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.249.38.187

05/21 13:53, , 1F
感謝回應 我想請問第二種方法中 哪個套件用起來會比較快?
05/21 13:53, 1F

05/21 13:54, , 2F
原文中提到的 Zxing vs PHP QRcode
05/21 13:54, 2F

05/21 13:55, , 3F
一個是外部執行java 一個是php class 要怎麼知道用誰好??
05/21 13:55, 3F

05/21 15:10, , 4F
Google的QR code support去年已經deprecated了。
05/21 15:10, 4F

05/21 15:12, , 5F
現在還能用,他不一定幾時要拿掉
05/21 15:12, 5F

05/21 16:40, , 6F
所以local端都有套件可以自己產生(含QRcode and Barcode)
05/21 16:40, 6F

05/21 16:41, , 7F
速度我試是差不多吧~我也是拿來產生PDF印標籤
05/21 16:41, 7F

05/21 18:55, , 8F
後來又看了一下,他說可以用到2015年 XP
05/21 18:55, 8F

05/21 21:06, , 9F
compile 過的會比較快. api 平均來說最慢
05/21 21:06, 9F
文章代碼(AID): #1HcmHChE (PHP)
文章代碼(AID): #1HcmHChE (PHP)