'\" t .\" Title: qrtool-decode .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.26 .\" Date: 2025-11-28 .\" Manual: General Commands Manual .\" Source: qrtool 0.13.2 .\" Language: English .\" .TH "QRTOOL\-DECODE" "1" "2025-11-28" "qrtool 0.13.2" "General Commands Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" qrtool-decode \- detect and decode a QR code .SH "SYNOPSIS" .sp \fBqrtool decode\fP [\fIOPTION\fP].\|.\|. [\fIIMAGE\fP] .SH "DESCRIPTION" .sp This command detects and decodes a \c .URL "https://www.qrcode.com" "QR code" "" from a raster or vector image. By default, the result will be output to standard output. .sp .B Supported image file formats .br .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://en.wikipedia.org/wiki/BMP_file_format" "BMP" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://en.wikipedia.org/wiki/DirectDraw_Surface" "DDS" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://tools.suckless.org/farbfeld/" "Farbfeld" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://en.wikipedia.org/wiki/GIF" "GIF" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://en.wikipedia.org/wiki/RGBE_image_format" "Radiance RGBE" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://en.wikipedia.org/wiki/ICO_(file_format)" "ICO" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://jpeg.org/jpeg/" "JPEG" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://openexr.com/" "OpenEXR" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://en.wikipedia.org/wiki/PNG" "PNG" "" .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://netpbm.sourceforge.net/doc/pnm.html" "PNM" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://qoiformat.org/" "QOI" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://www.w3.org/Graphics/SVG/" "SVG" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://en.wikipedia.org/wiki/Truevision_TGA" "TGA" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://en.wikipedia.org/wiki/TIFF" "TIFF" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://developers.google.com/speed/webp/" "WebP" "" (if enabled at compile time) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} .URL "https://en.wikipedia.org/wiki/X_BitMap" "XBM" "" (if enabled at compile time) .RE .sp Use \fB\-t\fP option to specify the image format. If this option is not specified, the image format is determined based on the extension or the magic number. .if n .sp .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 .B Caution .ps -1 .br .sp This command only supports decoding a .URL "https://www.qrcode.com/codes/model12.html" "normal QR code" "," and does not support decoding a .URL "https://www.qrcode.com/codes/microqr.html" "Micro QR code" "" and a .URL "https://www.qrcode.com/codes/rmqr.html" "rMQR code" "." .sp .5v .RE .SH "POSITIONAL ARGUMENTS" .sp \fIIMAGE\fP .RS 4 Input image file. If \fIIMAGE\fP is not specified, or if "\-" is specified, the image will be read from standard input. Supported raster image formats are based on the formats supported by the \c .URL "https://crates.io/crates/image" "\f(CRimage\fP" "" crate. The format of \fIIMAGE\fP is determined based on the extension or the magic number if possible. If the format cannot be determined, use \fB\-\-type\fP. Note that the SVG image is rasterized before scanning. .RE .SH "OPTIONS" .sp \fB\-t\fP, \fB\-\-type\fP \fIFORMAT\fP .RS 4 The format of the input. If \fIFORMAT\fP is not specified, the format is determined based on the extension or the magic number. .sp The possible values are: .RS 4 .sp \fBbmp\fP .RS 4 Windows Bitmap. This value is available if the \f(CRdecode\-from\-bmp\fP feature is enabled at compile time. .RE .sp \fBdds\fP .RS 4 DirectDraw Surface. This value is available if the \f(CRdecode\-from\-dds\fP feature is enabled at compile time. .RE .sp \fBfarbfeld\fP .RS 4 Farbfeld. This value is available if the \f(CRdecode\-from\-ff\fP feature is enabled at compile time. .RE .sp \fBgif\fP .RS 4 Graphics Interchange Format. This value is available if the \f(CRdecode\-from\-gif\fP feature is enabled at compile time. .RE .sp \fBhdr\fP .RS 4 Radiance RGBE. This value is available if the \f(CRdecode\-from\-hdr\fP feature is enabled at compile time. .RE .sp \fBico\fP .RS 4 ICO file format. This value also includes the CUR file format. This value is available if the \f(CRdecode\-from\-ico\fP feature is enabled at compile time. .RE .sp \fBjpeg\fP .RS 4 JPEG. This value is available if the \f(CRdecode\-from\-jpeg\fP feature is enabled at compile time. .RE .sp \fBopenexr\fP .RS 4 OpenEXR. This value is available if the \f(CRdecode\-from\-exr\fP feature is enabled at compile time. .RE .sp \fBpng\fP .RS 4 Portable Network Graphics. .RE .sp \fBpnm\fP .RS 4 Portable Anymap Format. This value is available if the \f(CRdecode\-from\-pnm\fP feature is enabled at compile time. .RE .sp \fBqoi\fP .RS 4 Quite OK Image Format. This value is available if the \f(CRdecode\-from\-qoi\fP feature is enabled at compile time. .RE .sp \fBsvg\fP .RS 4 Scalable Vector Graphics. This value also includes the gzip\-compressed SVG image. This value is available if the \f(CRdecode\-from\-svg\fP feature is enabled at compile time. .RE .sp \fBtga\fP .RS 4 Truevision TGA. This value is available if the \f(CRdecode\-from\-tga\fP feature is enabled at compile time. .RE .sp \fBtiff\fP .RS 4 Tag Image File Format. This value is available if the \f(CRdecode\-from\-tiff\fP feature is enabled at compile time. .RE .sp \fBwebp\fP .RS 4 WebP. This value is available if the \f(CRdecode\-from\-webp\fP feature is enabled at compile time. .RE .sp \fBxbm\fP .RS 4 X BitMap. This value is available if the \f(CRdecode\-from\-xbm\fP feature is enabled at compile time. .RE .RE .RE .sp \fB\-\-verbose\fP .RS 4 Also print the metadata. It is output to stderr. This option conflicts with \fB\-\-metadata\fP. .RE .sp \fB\-\-metadata\fP .RS 4 Print only the metadata. It is output to stderr. This option conflicts with \fB\-\-verbose\fP. .RE .sp \fB\-h\fP, \fB\-\-help\fP .RS 4 Print help message. The short flag (\fB\-h\fP) will print a condensed help message while the long flag (\fB\-\-help\fP) will print a detailed help message. .RE .sp \fB\-V\fP, \fB\-\-version\fP .RS 4 Print version number. .RE .SH "EXIT STATUS" .sp \fB0\fP .RS 4 Successful program execution. .RE .sp \fB1\fP .RS 4 An error occurred. .RE .sp \fB2\fP .RS 4 An error occurred while parsing command\-line arguments. .RE .sp Exit statuses other than these are defined by .URL "https://man.openbsd.org/sysexits" "\f(CR\fP" "." .SH "NOTES" .sp Source repository: .RS 4 .URL "https://github.com/sorairolake/qrtool" "" "" .RE .SH "EXAMPLES" .sp Detect and decode a QR code from the given image: .RS 4 $ \fBqrtool decode input.png\fP .RE .sp Decode a QR code from the given WebP image: .RS 4 $ \fBqrtool decode \-t webp input.webp\fP .RE .sp Also print the metadata when decoding a QR code: .RS 4 $ \fBqrtool decode \-\-verbose input.qoi\fP .RE .SH "REPORTING BUGS" .sp Report bugs to: .RS 4 .URL "https://github.com/sorairolake/qrtool/issues" "" "" .RE .SH "COPYRIGHT" .sp Copyright \(co 2022 Shun Sakai and contributors .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ . sp -1 . IP " 1." 4.2 .\} This program is distributed under the terms of either the Apache License 2.0 or the MIT License. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ . sp -1 . IP " 2." 4.2 .\} This manual page is distributed under the terms of the Creative Commons Attribution 4.0 International Public License. .RE .sp This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" .sp \fBqrtool\fP(1), \fBqrtool\-completion\fP(1), \fBqrtool\-encode\fP(1), \fBzbarimg\fP(1)