private static BitMatrix matrixFromString ( String uri , int width , int height ) { Writer qrWriter = new QRCodeWriter ( ) ; BitMatrix matrix ; try { matrix = qrWriter . encode ( uri , BarcodeFormat . QR_CODE , width , height ) ; } catch ( WriterException e ) { throw new RuntimeException ( e ) ; } return matrix ; }
Create a BitMatrix from a Bitcoin URI