Update Readme.markdown

Updated the example code to use the QrCodeRenderer to educate how easy it is to use this library.
pull/205/head^2
Charlie Hubbard 7 months ago committed by GitHub
parent 42a886d784
commit a6c12ba20a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -52,8 +52,7 @@ import io.nayuki.qrcodegen.*;
// Simple operation
QrCode qr0 = QrCode.encodeText("Hello, world!", QrCode.Ecc.MEDIUM);
BufferedImage img = toImage(qr0, 4, 10); // See QrCodeGeneratorDemo
ImageIO.write(img, "png", new File("qr-code.png"));
File qrCodeImage = new QrCodeRenderer().scale(4).border(10).renderFile(qr0, "png", new File("qr-code.png");
// Manual operation
List<QrSegment> segs = QrSegment.makeSegments("3141592653589793238462643383");

Loading…
Cancel
Save