It happens to me regularly that I get a low quality raster image of a QR code and I need it in better quality.
This works in principle:
zbarimg --quiet --raw qr-bad.png | qrencode -t SVG -o qr-good.svg
But sometimes it's important to keep the QR code exactly the same. Is there a way to detect the parameters of the original and keep them the same? I'd like the result to have exactly the same pattern of white and black blocks.