| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453 |
- # Configuration settings
- <!-- This file is auto generated from the source of QROptions.php -->
- ## version
- QR Code version number
- `1 ... 40` or `Version::AUTO` (default)
- **See also:**
- - `\chillerlan\QRCode\Common\Version`
- ## versionMin
- Minimum QR version
- if `QROptions::$version` is set to `Version::AUTO` (default: 1)
- ## versionMax
- Maximum QR version
- if `QROptions::$version` is set to `Version::AUTO` (default: 40)
- ## eccLevel
- Error correct level
- the constant `EccLevel::X` where `X` is:
- - `L` => 7% (default)
- - `M` => 15%
- - `Q` => 25%
- - `H` => 30%
- alternatively you can just pass the letters L/M/Q/H (case-insensitive) to the magic setter
- **See also:**
- - `\chillerlan\QRCode\Common\EccLevel`
- - [github.com/chillerlan/php-qrcode/discussions/160](https://github.com/chillerlan/php-qrcode/discussions/160)
- ## maskPattern
- Mask Pattern to use (no value in using, mostly for unit testing purposes)
- `0 ... 7` or `MaskPattern::PATTERN_AUTO` (default)
- **See also:**
- - `\chillerlan\QRCode\Common\MaskPattern`
- ## addQuietzone
- Add a "quiet zone" (margin) according to the QR code spec
- **See also:**
- - [www.qrcode.com/en/howto/code.html](https://www.qrcode.com/en/howto/code.html)
- ## quietzoneSize
- Size of the quiet zone
- internally clamped to `0 ... $moduleCount / 2` (default: 4)
- ## outputInterface
- The FQCN of the `QROutputInterface` to use
- ## returnResource
- Return the image resource instead of a render if applicable.
- - `QRGdImage`: `resource` (PHP < 8), `GdImage`
- - `QRImagick`: `Imagick`
- - `QRFpdf`: `FPDF`
- This option overrides/ignores other output settings, such as `QROptions::$cachefile`
- and `QROptions::$outputBase64`. (default: `false`)
- **See also:**
- - `\chillerlan\QRCode\Output\QROutputInterface::dump()`
- ## cachefile
- Optional cache file path `/path/to/cache.file`
- Please note that the `$file` parameter in `QRCode::render()` and `QRCode::renderMatrix()`
- takes precedence over the `QROptions::$cachefile` value. (default: `null`)
- **See also:**
- - `\chillerlan\QRCode\QRCode::render()`
- - `\chillerlan\QRCode\QRCode::renderMatrix()`
- ## outputBase64
- Toggle base64 data URI or raw data output (if applicable)
- (default: `true`)
- **See also:**
- - `\chillerlan\QRCode\Output\QROutputAbstract::toBase64DataURI()`
- ## eol
- Newline string
- (default: `PHP_EOL`)
- ## bgColor
- Sets the image background color (if applicable)
- - `QRImagick`: defaults to `"white"`
- - `QRGdImage`: defaults to `[255, 255, 255]`
- - `QRFpdf`: defaults to blank internally (white page)
- ## invertMatrix
- Whether to invert the matrix (reflectance reversal)
- (default: `false`)
- **See also:**
- - `\chillerlan\QRCode\Data\QRMatrix::invert()`
- ## drawLightModules
- Whether to draw the light (false) modules
- (default: `true`)
- ## drawCircularModules
- Specify whether to draw the modules as filled circles
- a note for `GdImage` output:
- if `QROptions::$scale` is less than 20, the image will be upscaled internally, then the modules will be drawn
- using `imagefilledellipse()` and then scaled back to the expected size
- No effect in: `QREps`, `QRFpdf`, `QRMarkupHTML`
- **See also:**
- - [php.net: `\imagefilledellipse()`](https://www.php.net/manual/function.imagefilledellipse)
- - [github.com/chillerlan/php-qrcode/issues/23](https://github.com/chillerlan/php-qrcode/issues/23)
- - [github.com/chillerlan/php-qrcode/discussions/122](https://github.com/chillerlan/php-qrcode/discussions/122)
- ## circleRadius
- Specifies the radius of the modules when `QROptions::$drawCircularModules` is set to `true`
- (default: 0.45)
- ## keepAsSquare
- Specifies which module types to exclude when `QROptions::$drawCircularModules` is set to `true`
- (default: `[]`)
- ## connectPaths
- Whether to connect the paths for the several module types to avoid weird glitches when using gradients etc.
- This option is exclusive to output classes that use the module collector `QROutputAbstract::collectModules()`,
- which converts the `$M_TYPE` of all modules to `QRMatrix::M_DATA` and `QRMatrix::M_DATA_DARK` respectively.
- Module types that should not be added to the connected path can be excluded via `QROptions::$excludeFromConnect`.
- Currentty used in `QREps` and `QRMarkupSVG`.
- **See also:**
- - `\chillerlan\QRCode\Output\QROutputAbstract::collectModules()`
- - `\chillerlan\QRCode\QROptionsTrait::$excludeFromConnect`
- - [github.com/chillerlan/php-qrcode/issues/57](https://github.com/chillerlan/php-qrcode/issues/57)
- ## excludeFromConnect
- Specify which paths/patterns to exclude from connecting if `QROptions::$connectPaths` is set to `true`
- **See also:**
- - `\chillerlan\QRCode\QROptionsTrait::$connectPaths`
- ## moduleValues
- Module values map
- - `QRImagick`, `QRMarkupHTML`, `QRMarkupSVG`: #ABCDEF, cssname, rgb(), rgba()...
- - `QREps`, `QRFpdf`, `QRGdImage`: `[R, G, B]` // 0-255
- - `QREps`: `[C, M, Y, K]` // 0-255
- **See also:**
- - `\chillerlan\QRCode\Output\QROutputAbstract::setModuleValues()`
- ## addLogoSpace
- Toggles logo space creation
- **See also:**
- - `\chillerlan\QRCode\QRCode::addMatrixModifications()`
- - `\chillerlan\QRCode\Data\QRMatrix::setLogoSpace()`
- ## logoSpaceWidth
- Width of the logo space
- if only `QROptions::$logoSpaceWidth` is given, the logo space is assumed a square of that size
- ## logoSpaceHeight
- Height of the logo space
- if only `QROptions::$logoSpaceHeight` is given, the logo space is assumed a square of that size
- ## logoSpaceStartX
- Optional horizontal start position of the logo space (top left corner)
- ## logoSpaceStartY
- Optional vertical start position of the logo space (top left corner)
- ## scale
- Pixel size of a QR code module
- ## imageTransparent
- Toggle transparency
- - `QRGdImage` and `QRImagick`: the given `QROptions::$transparencyColor` is set as transparent
- **See also:**
- - [github.com/chillerlan/php-qrcode/discussions/121](https://github.com/chillerlan/php-qrcode/discussions/121)
- ## transparencyColor
- Sets a transparency color for when `QROptions::$imageTransparent` is set to `true`.
- Defaults to `QROptions::$bgColor`.
- - `QRGdImage`: `[R, G, B]`, this color is set as transparent in `imagecolortransparent()`
- - `QRImagick`: `"color_str"`, this color is set in `Imagick::transparentPaintImage()`
- **See also:**
- - [php.net: `\imagecolortransparent()`](https://www.php.net/manual/function.imagecolortransparent)
- - [php.net: `\Imagick::transparentPaintImage()`](https://www.php.net/manual/imagick.transparentpaintimage)
- ## quality
- Compression quality
- The given value depends on the used output type:
- - `QRGdImageBMP`: `[0...1]`
- - `QRGdImageJPEG`: `[0...100]`
- - `QRGdImageWEBP`: `[0...9]`
- - `QRGdImagePNG`: `[0...100]`
- - `QRImagick`: `[0...100]`
- **See also:**
- - [php.net: `\imagebmp()`](https://www.php.net/manual/function.imagebmp)
- - [php.net: `\imagejpeg()`](https://www.php.net/manual/function.imagejpeg)
- - [php.net: `\imagepng()`](https://www.php.net/manual/function.imagepng)
- - [php.net: `\imagewebp()`](https://www.php.net/manual/function.imagewebp)
- - [php.net: `\Imagick::setImageCompressionQuality()`](https://www.php.net/manual/imagick.setimagecompressionquality)
- ## gdImageUseUpscale
- Toggles the usage of internal upscaling when `QROptions::$drawCircularModules` is set to `true` and
- `QROptions::$scale` is less than 20
- **See also:**
- - `\chillerlan\QRCode\Output\QRGdImage::createImage()`
- - [github.com/chillerlan/php-qrcode/issues/23](https://github.com/chillerlan/php-qrcode/issues/23)
- ## imagickFormat
- Imagick output format
- **See also:**
- - [php.net: `\Imagick::setImageFormat()`](https://www.php.net/manual/imagick.setimageformat)
- - [www.imagemagick.org/script/formats.php](https://www.imagemagick.org/script/formats.php)
- ## cssClass
- A common css class
- ## svgAddXmlHeader
- Whether to add an XML header line or not, e.g. to embed the SVG directly in HTML
- `<?xml version="1.0" encoding="UTF-8"?>`
- ## svgDefs
- Anything in the SVG `<defs>` tag
- **See also:**
- - [developer.mozilla.org/en-US/docs/Web/SVG/Element/defs](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs)
- ## svgPreserveAspectRatio
- Sets the value for the "preserveAspectRatio" on the `<svg>` element
- **See also:**
- - [developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio)
- ## svgUseFillAttributes
- Whether to use the SVG `fill` attributes
- If set to `true` (default), the `fill` attribute will be set with the module value for the `<path>` element's `$M_TYPE`.
- When set to `false`, the module values map will be ignored and the QR Code may be styled via CSS.
- **See also:**
- - [developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill)
- ## textLineStart
- An optional line prefix, e.g. empty space to align the QR Code in a console
- ## jsonFlags
- Sets the flags to use for the `json_encode()` call
- **See also:**
- - [www.php.net/manual/json.constants.php](https://www.php.net/manual/json.constants.php)
- ## fpdfMeasureUnit
- Measurement unit for `FPDF` output: `pt`, `mm`, `cm`, `in` (default: `pt`)
- **See also:**
- - `FPDF::__construct()`
- ## xmlStylesheet
- Sets an optional XSLT stylesheet in the XML output
- **See also:**
- - [developer.mozilla.org/en-US/docs/Web/XSLT](https://developer.mozilla.org/en-US/docs/Web/XSLT)
- ## readerUseImagickIfAvailable
- Use Imagick (if available) when reading QR Codes
- ## readerGrayscale
- Grayscale the image before reading
- ## readerInvertColors
- Invert the colors of the image
- ## readerIncreaseContrast
- Increase the contrast before reading
- note that applying contrast works different in GD and Imagick, so mileage may vary
|