/** * Returns a {@link android.graphics.Bitmap} without creating a {@link java.io.File} first. * * @return {@link android.graphics.Bitmap} of this QRCode */ public Bitmap bitmap() { try { return MatrixToImageWriter.toBitmap(createMatrix(text)); } catch (WriterException e) { throw new RuntimeException( "Failed to create QR image from text due to underlying exception", e); } }