第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

QR code 生成的二維碼

QR code 生成的二維碼

大咪 2016-09-23 10:11:59
這個生成的二維碼怎么做才能讓它實現(xiàn)掃碼跳轉(zhuǎn)到網(wǎng)頁呀,老師講的都是直接顯示出字符串來。。。 Qrcode?x?=?new?Qrcode(); x.setQrcodeErrorCorrect('M');//?糾錯等級 x.setQrcodeEncodeMode('B');//?N代表數(shù)字,A代表a-,B代表其他字符 x.setQrcodeVersion(7);//?版本 String?qrData?=?"idcbgp.cn"; int?width?=?67?+?12?*?(?7?-?1?); int?height?=?67?+?12?*?(?7?-?1?); BufferedImage?bufferedImage?=?new?BufferedImage(width,?height,?BufferedImage.TYPE_INT_RGB); Graphics2D?gs?=?bufferedImage.createGraphics(); gs.setBackground(Color.white); gs.setColor(Color.black); gs.clearRect(0,?0,?width,?height); int?pixoff?=?2;//?偏移量 byte[]?d?=?qrData.getBytes("gb2312"); if?(d.length?>?0?&&?d.length?<?120)?{ boolean[][]?s?=?x.calQrcode(d); for?(int?i?=?0;?i?<?s.length;?i++)?{ for?(int?j?=?0;?j?<?s.length;?j++)?{ if?(s[j][i])?{ gs.fillRect(j?*?3?+?pixoff,?i?*?3?+?pixoff,?3,?3); } } } } //如果要是修改的話是不是得需要把上邊的String改成Url去處理呢?求解答 gs.dispose(); bufferedImage.flush(); ImageIO.write(bufferedImage,?"png",?new?File("D:/code/qrcode.png")); }
查看完整描述

1 回答

已采納
?
iHelin

TA貢獻(xiàn)5條經(jīng)驗 獲得超1個贊


String?qrData?=?"http://idcbgp.cn";,其實這個也是app自己實現(xiàn)的識別跳轉(zhuǎn),本質(zhì)上其實還是一段文本

查看完整回答
反對 回復(fù) 2016-09-25
  • 1 回答
  • 0 關(guān)注
  • 1724 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號