QRTOOL-DECODE(1)
π qrtool-decode β the manual, but make it make sense
okay so real quick before we dive in: you're reading the qrtool-decode page, and it lives in section 1 of the General Commands Manual. That's it, that's the housekeeping, let's go π«Ά
β¨ NAME β¨
qrtool-decode β bestie, it detects and decodes a QR code for you. literally that's the whole job π
πΈ SYNOPSIS πΈ
qrtool decode [OPTION]... [IMAGE]
π¦ DESCRIPTION π¦
Look at her go β this command detects and decodes a QR code (like, the ones from <https://www.qrcode.com>) out of a raster or vector image. And by default? The result just pops right out onto standard output. no extra steps, no drama β¨
π Supported image file formats
- BMP β <https://en.wikipedia.org/wiki/BMP_file_format> (if enabled at compile time)
- DDS β <https://en.wikipedia.org/wiki/DirectDraw_Surface> (if enabled at compile time)
- Farbfeld β <https://tools.suckless.org/farbfeld/> (if enabled at compile time)
- GIF β <https://en.wikipedia.org/wiki/GIF> (if enabled at compile time)
- Radiance RGBE β <https://en.wikipedia.org/wiki/RGBE_image_format> (if enabled at compile time)
- ICO β <https://en.wikipedia.org/wiki/ICO_(file_format)> (if enabled at compile time)
- JPEG β <https://jpeg.org/jpeg/> (if enabled at compile time)
- OpenEXR β <https://openexr.com/> (if enabled at compile time)
- PNG β <https://en.wikipedia.org/wiki/PNG>
- PNM β <https://netpbm.sourceforge.net/doc/pnm.html> (if enabled at compile time)
- QOI β <https://qoiformat.org/> (if enabled at compile time)
- SVG β <https://www.w3.org/Graphics/SVG/> (if enabled at compile time)
- TGA β <https://en.wikipedia.org/wiki/Truevision_TGA> (if enabled at compile time)
- TIFF β <https://en.wikipedia.org/wiki/TIFF> (if enabled at compile time)
- WebP β <https://developers.google.com/speed/webp/> (if enabled at compile time)
- XBM β <https://en.wikipedia.org/wiki/X_BitMap> (if enabled at compile time)
okay and here's the trick, iykyk: use the -t option to tell it the image format. Don't specify it? Then the format gets figured out from the extension or the magic number. she's smart like that π
β οΈ Caution, and I mean it: this command only supports decoding a normal QR code (<https://www.qrcode.com/codes/model12.html>). It does NOT support decoding a Micro QR code (<https://www.qrcode.com/codes/microqr.html>) and it does NOT support a rMQR code (<https://www.qrcode.com/codes/rmqr.html>). do not come for her about the tiny ones, she simply will not π
π POSITIONAL ARGUMENTS π
π IMAGE
Your input image file, bestie. And here's the cute part β if IMAGE is not specified, or if you pass "-", the image gets read from standard input π«Ά
Supported raster image formats are based on the formats supported by the image crate (<https://crates.io/crates/image>). The format of IMAGE gets determined based on the extension or the magic number if possible. Can't figure it out? That's a --type moment. And ngl, one more thing: an SVG image gets rasterized before scanning. icon behavior β¨
π OPTIONS π
-t,--typeFORMAT β tells it the format of the input. If FORMAT is not specified, the format is determined based on the extension or the magic number.
The possible values are, and yes she's listing all of them, because we don't skip:
bmpβ Windows Bitmap. This value is available if thedecode-from-bmpfeature is enabled at compile time.ddsβ DirectDraw Surface. This value is available if thedecode-from-ddsfeature is enabled at compile time.farbfeldβ Farbfeld. This value is available if thedecode-from-fffeature is enabled at compile time. (yes,farbfeldthe value,decode-from-ffthe feature, that's not a typo, that's just how she is π)gifβ Graphics Interchange Format. This value is available if thedecode-from-giffeature is enabled at compile time.hdrβ Radiance RGBE. This value is available if thedecode-from-hdrfeature is enabled at compile time.icoβ ICO file format. This value also includes the CUR file format. This value is available if thedecode-from-icofeature is enabled at compile time.jpegβ JPEG. This value is available if thedecode-from-jpegfeature is enabled at compile time.openexrβ OpenEXR. This value is available if thedecode-from-exrfeature is enabled at compile time.pngβ Portable Network Graphics. (no feature gate on this one, she's always invited π)pnmβ Portable Anymap Format. This value is available if thedecode-from-pnmfeature is enabled at compile time.qoiβ Quite OK Image Format. This value is available if thedecode-from-qoifeature is enabled at compile time.svgβ Scalable Vector Graphics. This value also includes the gzip-compressed SVG image. This value is available if thedecode-from-svgfeature is enabled at compile time.tgaβ Truevision TGA. This value is available if thedecode-from-tgafeature is enabled at compile time.tiffβ Tag Image File Format. This value is available if thedecode-from-tifffeature is enabled at compile time.webpβ WebP. This value is available if thedecode-from-webpfeature is enabled at compile time.xbmβ X BitMap. This value is available if thedecode-from-xbmfeature is enabled at compile time.
--verboseβ also prints the metadata. It goes out to stderr. Heads up though: this option conflicts with--metadataβ you can't have both, pick a lane π--metadataβ prints only the metadata. It goes out to stderr. And yep, this option conflicts with--verbose. same energy, opposite corners π₯-h,--helpβ prints the help message. The short flag (-h) gives you the condensed help message, while the long flag (--help) gives you the detailed one. two moods, both valid π-V,--versionβ prints the version number.
β EXIT STATUS β
0β successful program execution. slay π1β an error occurred. π2β an error occurred while parsing command-line arguments. (the flags fought back π)
Exit statuses other than these are defined by sysexits.h (<https://man.openbsd.org/sysexits>).
π§ NOTES π§
Source repository: <https://github.com/sorairolake/qrtool>
π₯ EXAMPLES π₯
Detect and decode a QR code from the given image:
$ qrtool decode input.png
Decode a QR code from the given WebP image:
$ qrtool decode -t webp input.webp
Also print the metadata when decoding a QR code:
$ qrtool decode --verbose input.qoi
π REPORTING BUGS π
Found a bug? Report bugs to: <https://github.com/sorairolake/qrtool/issues>
be nice about it, she's trying her best π«Ά
π COPYRIGHT π
Copyright Β© 2022 Shun Sakai and contributors
- This program is distributed under the terms of either the Apache License 2.0 or the MIT License.
- This manual page is distributed under the terms of the Creative Commons Attribution 4.0 International Public License.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (no cap, that's the actual legal vibe π)
π SEE ALSO π
qrtool(1), qrtool-completion(1), qrtool-encode(1), zbarimg(1)
and that's the whole page, bestie!! mwah π this was qrtool 0.13.2, dated 2025-11-28 β go decode something iconic πβ¨π
π¦ where this page comes from
- arch rolling: qrtool 0.13.2-1 Β· MIT AND Apache-2.0 AND CC-BY-4.0
- nixos 26.05: qrtool 0.13.2
- nixpkgs unstable: qrtool 0.13.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms