Reduce border width on QR Codes generated by ZXing?

后端 未结 4 613
傲寒
傲寒 2021-01-30 20:58

I\'m using com.google.zxing.qrcode.QRCodeWriter to encode data and com.google.zxing.client.j2se.MatrixToImageWriter to generate the QR Code image. On a

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-30 21:25

        HashMap hintMap = new HashMap();
        hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.Q);
        hintMap.put(EncodeHintType.MARGIN, -1);
    

    no margin

    UPDATE

    Add dependencies (from comments)

    
        com.google.zxing 
        core 
        3.2.0
        jar 
     
     
        com.google.zxing
        javase 
        3.2.0 
    
    

提交回复
热议问题