#include <qrinvoice/model/qr_invoice.hpp>
#include <qrinvoice/code_creator.hpp>
// ...
const qrinvoice::model::qr_invoice qr_invoice = // create using qr_invoice::builder;
qrinvoice::code_creator code_creator;
const qrinvoice::output::qr_code qrcode = code_creator
.qr_invoice(qr_invoice)
.desired_qr_code_size(500) // pixels
.output_format(qrinvoice::output_format::png)
.create_qr_code();
// the resulting byte vector contains the Swiss QR Code as PNG
// please note that the size (pixels) varies - desired size is just a hint,
// actual number of pixels are always a multiple of the QR code modules in order to produce sharp results without anti-aliasing
// Render size is calculated as: nr_of_modules * round(desired_qr_code_size / nr_of_modules). Render size will be at least nr_of_modules.
// "qrinvoice::output::output::byte" is "unsigned char"
const std::vector<qrinvoice::output::output::byte> &data = qrcode.get_data();
const size_t i = qrcode.get_size();