引用1楼m0_38083682的回复:Hashtablehints=newHashtable();创建一个table
hints.put(EncodeHintType.CHARACTER_SET,"utf-8");设置编码
BitMatrixbm=newMultiFormatWriter().encode(website,BarcodeFormat.QR_CODE,width,height,hints);生成一个table
BufferedImageimage=toImage(bm);转换成图片
ImageIO.write(image,format,output);输出这个图片
|