Configuration-settings.html 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. <!DOCTYPE html>
  2. <html class="writer-html5" lang="en" >
  3. <head>
  4. <meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>Configuration settings &mdash; PHP-QRCode main
  7. Manual</title>
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  10. <!--[if lt IE 9]>
  11. <script src="../_static/js/html5shiv.min.js"></script>
  12. <![endif]-->
  13. <script src="../_static/jquery.js?v=5d32c60e"></script>
  14. <script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
  15. <script src="../_static/documentation_options.js?v=a8da1a53"></script>
  16. <script src="../_static/doctools.js?v=888ff710"></script>
  17. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  18. <script src="../_static/js/theme.js"></script>
  19. <link rel="index" title="Index" href="../genindex.html" />
  20. <link rel="search" title="Search" href="../search.html" />
  21. <link rel="next" title="Module values" href="../Customizing/Module-Values.html" />
  22. <link rel="prev" title="Advanced usage" href="Advanced-usage.html" />
  23. </head>
  24. <body class="wy-body-for-nav">
  25. <div class="wy-grid-for-nav">
  26. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  27. <div class="wy-side-scroll">
  28. <div class="wy-side-nav-search" >
  29. <a href="../index.html" class="icon icon-home">
  30. PHP-QRCode
  31. </a>
  32. <div role="search">
  33. <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
  34. <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
  35. <input type="hidden" name="check_keywords" value="yes" />
  36. <input type="hidden" name="area" value="default" />
  37. </form>
  38. </div>
  39. </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
  40. <p class="caption" role="heading"><span class="caption-text">Usage</span></p>
  41. <ul class="current">
  42. <li class="toctree-l1"><a class="reference internal" href="Overview.html">Overview</a><ul>
  43. <li class="toctree-l2"><a class="reference internal" href="Overview.html#features">Features</a></li>
  44. <li class="toctree-l2"><a class="reference internal" href="Overview.html#requirements">Requirements</a></li>
  45. <li class="toctree-l2"><a class="reference internal" href="Overview.html#framework-integration">Framework Integration</a></li>
  46. <li class="toctree-l2"><a class="reference internal" href="Overview.html#shameless-advertising">Shameless advertising</a></li>
  47. </ul>
  48. </li>
  49. <li class="toctree-l1"><a class="reference internal" href="Installation.html">Installation</a><ul>
  50. <li class="toctree-l2"><a class="reference internal" href="Installation.html#installation-with-composer">Installation with Composer</a><ul>
  51. <li class="toctree-l3"><a class="reference internal" href="Installation.html#composer-json">composer.json</a><ul>
  52. <li class="toctree-l4"><a class="reference internal" href="Installation.html#version-switch">Version switch</a></li>
  53. </ul>
  54. </li>
  55. <li class="toctree-l3"><a class="reference internal" href="Installation.html#terminal">Terminal</a></li>
  56. </ul>
  57. </li>
  58. <li class="toctree-l2"><a class="reference internal" href="Installation.html#manual-installation">Manual installation</a><ul>
  59. <li class="toctree-l3"><a class="reference internal" href="Installation.html#can-i-use-this-library-without-using-composer">Can i use this library without using composer?</a></li>
  60. </ul>
  61. </li>
  62. <li class="toctree-l2"><a class="reference internal" href="Installation.html#supported-php-versions-extension-requirements">Supported PHP versions &amp; extension requirements</a></li>
  63. <li class="toctree-l2"><a class="reference internal" href="Installation.html#imagemagick">ImageMagick</a></li>
  64. </ul>
  65. </li>
  66. <li class="toctree-l1"><a class="reference internal" href="Quickstart.html">Quickstart</a><ul>
  67. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#import-the-library">Import the library</a></li>
  68. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#create-your-first-qr-code">Create your first QR Code</a><ul>
  69. <li class="toctree-l3"><a class="reference internal" href="Quickstart.html#configuration">Configuration</a></li>
  70. </ul>
  71. </li>
  72. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#reading-qr-codes">Reading QR Codes</a></li>
  73. <li class="toctree-l2"><a class="reference internal" href="Quickstart.html#notes">Notes</a></li>
  74. </ul>
  75. </li>
  76. <li class="toctree-l1"><a class="reference internal" href="Advanced-usage.html">Advanced usage</a><ul>
  77. <li class="toctree-l2"><a class="reference internal" href="Advanced-usage.html#configuration-via-qroptions">Configuration via <code class="docutils literal notranslate"><span class="pre">QROptions</span></code></a><ul>
  78. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#supply-an-iterable-of-options">Supply an <code class="docutils literal notranslate"><span class="pre">iterable</span></code> of options</a></li>
  79. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#load-and-save-options-from-to-json">Load and save options from/to JSON</a></li>
  80. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#extending-the-qroptions-class">Extending the <code class="docutils literal notranslate"><span class="pre">QROptions</span></code> class</a></li>
  81. </ul>
  82. </li>
  83. <li class="toctree-l2"><a class="reference internal" href="Advanced-usage.html#qrcode-methods"><code class="docutils literal notranslate"><span class="pre">QRCode</span></code> methods</a><ul>
  84. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#render-a-qrmatrix-instance">Render a <code class="docutils literal notranslate"><span class="pre">QRMatrix</span></code> instance</a></li>
  85. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#mixed-mode">Mixed mode</a></li>
  86. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#qr-code-reader">QR Code reader</a></li>
  87. </ul>
  88. </li>
  89. <li class="toctree-l2"><a class="reference internal" href="Advanced-usage.html#common-output-options">Common output options</a><ul>
  90. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#save-to-file">Save to file</a></li>
  91. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#base64-uri-output">Base64 URI output</a></li>
  92. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#return-the-image-resource">Return the image resource</a></li>
  93. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#add-a-logo-space">Add a logo space</a></li>
  94. </ul>
  95. </li>
  96. </ul>
  97. </li>
  98. <li class="toctree-l1 current"><a class="current reference internal" href="#">Configuration settings</a><ul>
  99. <li class="toctree-l2"><a class="reference internal" href="#version">version</a></li>
  100. <li class="toctree-l2"><a class="reference internal" href="#versionmin">versionMin</a></li>
  101. <li class="toctree-l2"><a class="reference internal" href="#versionmax">versionMax</a></li>
  102. <li class="toctree-l2"><a class="reference internal" href="#ecclevel">eccLevel</a></li>
  103. <li class="toctree-l2"><a class="reference internal" href="#maskpattern">maskPattern</a></li>
  104. <li class="toctree-l2"><a class="reference internal" href="#addquietzone">addQuietzone</a></li>
  105. <li class="toctree-l2"><a class="reference internal" href="#quietzonesize">quietzoneSize</a></li>
  106. <li class="toctree-l2"><a class="reference internal" href="#outputtype">outputType</a></li>
  107. <li class="toctree-l2"><a class="reference internal" href="#outputinterface">outputInterface</a></li>
  108. <li class="toctree-l2"><a class="reference internal" href="#returnresource">returnResource</a></li>
  109. <li class="toctree-l2"><a class="reference internal" href="#cachefile">cachefile</a></li>
  110. <li class="toctree-l2"><a class="reference internal" href="#outputbase64">outputBase64</a></li>
  111. <li class="toctree-l2"><a class="reference internal" href="#eol">eol</a></li>
  112. <li class="toctree-l2"><a class="reference internal" href="#bgcolor">bgColor</a></li>
  113. <li class="toctree-l2"><a class="reference internal" href="#invertmatrix">invertMatrix</a></li>
  114. <li class="toctree-l2"><a class="reference internal" href="#drawlightmodules">drawLightModules</a></li>
  115. <li class="toctree-l2"><a class="reference internal" href="#drawcircularmodules">drawCircularModules</a></li>
  116. <li class="toctree-l2"><a class="reference internal" href="#circleradius">circleRadius</a></li>
  117. <li class="toctree-l2"><a class="reference internal" href="#keepassquare">keepAsSquare</a></li>
  118. <li class="toctree-l2"><a class="reference internal" href="#connectpaths">connectPaths</a></li>
  119. <li class="toctree-l2"><a class="reference internal" href="#excludefromconnect">excludeFromConnect</a></li>
  120. <li class="toctree-l2"><a class="reference internal" href="#modulevalues">moduleValues</a></li>
  121. <li class="toctree-l2"><a class="reference internal" href="#addlogospace">addLogoSpace</a></li>
  122. <li class="toctree-l2"><a class="reference internal" href="#logospacewidth">logoSpaceWidth</a></li>
  123. <li class="toctree-l2"><a class="reference internal" href="#logospaceheight">logoSpaceHeight</a></li>
  124. <li class="toctree-l2"><a class="reference internal" href="#logospacestartx">logoSpaceStartX</a></li>
  125. <li class="toctree-l2"><a class="reference internal" href="#logospacestarty">logoSpaceStartY</a></li>
  126. <li class="toctree-l2"><a class="reference internal" href="#scale">scale</a></li>
  127. <li class="toctree-l2"><a class="reference internal" href="#imagetransparent">imageTransparent</a></li>
  128. <li class="toctree-l2"><a class="reference internal" href="#transparencycolor">transparencyColor</a></li>
  129. <li class="toctree-l2"><a class="reference internal" href="#quality">quality</a></li>
  130. <li class="toctree-l2"><a class="reference internal" href="#imagickformat">imagickFormat</a></li>
  131. <li class="toctree-l2"><a class="reference internal" href="#cssclass">cssClass</a></li>
  132. <li class="toctree-l2"><a class="reference internal" href="#markupdark">markupDark</a></li>
  133. <li class="toctree-l2"><a class="reference internal" href="#markuplight">markupLight</a></li>
  134. <li class="toctree-l2"><a class="reference internal" href="#svgaddxmlheader">svgAddXmlHeader</a></li>
  135. <li class="toctree-l2"><a class="reference internal" href="#svgopacity">svgOpacity</a></li>
  136. <li class="toctree-l2"><a class="reference internal" href="#svgdefs">svgDefs</a></li>
  137. <li class="toctree-l2"><a class="reference internal" href="#svgpreserveaspectratio">svgPreserveAspectRatio</a></li>
  138. <li class="toctree-l2"><a class="reference internal" href="#textdark">textDark</a></li>
  139. <li class="toctree-l2"><a class="reference internal" href="#textlight">textLight</a></li>
  140. <li class="toctree-l2"><a class="reference internal" href="#textlinestart">textLineStart</a></li>
  141. <li class="toctree-l2"><a class="reference internal" href="#jsonasbooleans">jsonAsBooleans</a></li>
  142. <li class="toctree-l2"><a class="reference internal" href="#fpdfmeasureunit">fpdfMeasureUnit</a></li>
  143. <li class="toctree-l2"><a class="reference internal" href="#readeruseimagickifavailable">readerUseImagickIfAvailable</a></li>
  144. <li class="toctree-l2"><a class="reference internal" href="#readergrayscale">readerGrayscale</a></li>
  145. <li class="toctree-l2"><a class="reference internal" href="#readerincreasecontrast">readerIncreaseContrast</a></li>
  146. </ul>
  147. </li>
  148. </ul>
  149. <p class="caption" role="heading"><span class="caption-text">Customizing output</span></p>
  150. <ul>
  151. <li class="toctree-l1"><a class="reference internal" href="../Customizing/Module-Values.html">Module values</a><ul>
  152. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Module-Values.html#basics">Basics</a></li>
  153. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Module-Values.html#assigning-values">Assigning values</a></li>
  154. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Module-Values.html#handling-in-your-own-qroutputinterface">Handling in your own <code class="docutils literal notranslate"><span class="pre">QROutputInterface</span></code></a><ul>
  155. <li class="toctree-l3"><a class="reference internal" href="../Customizing/Module-Values.html#setting-module-values">Setting module values</a></li>
  156. <li class="toctree-l3"><a class="reference internal" href="../Customizing/Module-Values.html#using-the-module-values">Using the module values</a></li>
  157. </ul>
  158. </li>
  159. </ul>
  160. </li>
  161. </ul>
  162. <p class="caption" role="heading"><span class="caption-text">Built-In Output Modules</span></p>
  163. <ul>
  164. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QREps.html">QREps</a><ul>
  165. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QREps.html#example">Example</a></li>
  166. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QREps.html#additional-methods">Additional methods</a></li>
  167. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QREps.html#options-that-affect-this-module">Options that affect this module</a><ul>
  168. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QREps.html#options-that-have-no-effect">Options that have no effect</a></li>
  169. </ul>
  170. </li>
  171. </ul>
  172. </li>
  173. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRFpdf.html">QRFpdf</a><ul>
  174. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#example">Example</a></li>
  175. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#additional-methods">Additional methods</a></li>
  176. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#options-that-affect-this-module">Options that affect this module</a><ul>
  177. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#options-that-have-no-effect">Options that have no effect</a></li>
  178. </ul>
  179. </li>
  180. </ul>
  181. </li>
  182. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRGdImage.html">QRGdImage</a><ul>
  183. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#example">Example</a></li>
  184. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#additional-methods">Additional methods</a></li>
  185. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#options-that-affect-this-module">Options that affect this module</a><ul>
  186. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#options-that-have-no-effect">Options that have no effect</a></li>
  187. </ul>
  188. </li>
  189. </ul>
  190. </li>
  191. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRImagick.html">QRImagick</a><ul>
  192. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#example">Example</a></li>
  193. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#additional-methods">Additional methods</a></li>
  194. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#options-that-affect-this-module">Options that affect this module</a><ul>
  195. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRImagick.html#options-that-have-no-effect">Options that have no effect</a></li>
  196. </ul>
  197. </li>
  198. </ul>
  199. </li>
  200. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html">QRMarkupHTML</a><ul>
  201. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#example">Example</a></li>
  202. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#additional-methods">Additional methods</a></li>
  203. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#options-that-affect-this-module">Options that affect this module</a><ul>
  204. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#options-that-have-no-effect">Options that have no effect</a></li>
  205. </ul>
  206. </li>
  207. </ul>
  208. </li>
  209. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html">QRMarkupSVG</a><ul>
  210. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#example">Example</a></li>
  211. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#additional-methods">Additional methods</a></li>
  212. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#options-that-affect-this-module">Options that affect this module</a><ul>
  213. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#options-that-have-no-effect">Options that have no effect</a></li>
  214. </ul>
  215. </li>
  216. </ul>
  217. </li>
  218. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRString.html">QRString</a><ul>
  219. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#plain-text">Plain text</a></li>
  220. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#json">JSON</a></li>
  221. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#additional-methods">Additional methods</a></li>
  222. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#options-that-affect-this-module">Options that affect this module</a><ul>
  223. <li class="toctree-l3"><a class="reference internal" href="../Built-In-Output/QRString.html#options-that-have-no-effect">Options that have no effect</a></li>
  224. </ul>
  225. </li>
  226. </ul>
  227. </li>
  228. </ul>
  229. <p class="caption" role="heading"><span class="caption-text">Appendix</span></p>
  230. <ul>
  231. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Contribute.html">How to contribute</a><ul>
  232. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#questions-and-issues">Questions and issues</a></li>
  233. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#bug-reports">Bug reports</a></li>
  234. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#pull-requests-and-bug-fixes">Pull requests and bug fixes</a></li>
  235. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#documentation">Documentation</a></li>
  236. </ul>
  237. </li>
  238. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Terminology.html">Terminology</a><ul>
  239. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#qr-code">QR Code</a></li>
  240. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#matrix">Matrix</a><ul>
  241. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#module">Module</a></li>
  242. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#version">Version</a></li>
  243. </ul>
  244. </li>
  245. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#function-patterns">Function Patterns</a><ul>
  246. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#finder-pattern">Finder Pattern</a></li>
  247. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#alignment-pattern">Alignment Pattern</a></li>
  248. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#timing-pattern">Timing Pattern</a></li>
  249. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#separators">Separators</a></li>
  250. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#quiet-zone">Quiet Zone</a></li>
  251. </ul>
  252. </li>
  253. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#encoding-region">Encoding Region</a><ul>
  254. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#data">Data</a></li>
  255. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#version-information">Version Information</a></li>
  256. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#format-information">Format Information</a></li>
  257. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#darkmodule">Darkmodule</a></li>
  258. </ul>
  259. </li>
  260. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#mode">Mode</a><ul>
  261. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#segment">Segment</a></li>
  262. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#extended-channel-interpretation-eci">Extended Channel Interpretation (ECI)</a></li>
  263. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#mixed-mode">Mixed Mode</a></li>
  264. </ul>
  265. </li>
  266. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#ecc-error-correction-coding">ECC (Error Correction Coding)</a><ul>
  267. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#ecc-level">ECC Level</a></li>
  268. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#maximum-data-capacity">Maximum data capacity</a></li>
  269. </ul>
  270. </li>
  271. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#data-masking">Data masking</a><ul>
  272. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#evaluation">Evaluation</a></li>
  273. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#mask-pattern">Mask pattern</a></li>
  274. </ul>
  275. </li>
  276. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#reflectance">Reflectance</a></li>
  277. </ul>
  278. </li>
  279. <li class="toctree-l1"><a class="reference internal" href="../Appendix/URI-Content.html">Popular content and URI schemes</a><ul>
  280. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#url-https">URL <code class="docutils literal notranslate"><span class="pre">https</span></code></a></li>
  281. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#e-mail-mailto">E-Mail <code class="docutils literal notranslate"><span class="pre">mailto</span></code></a></li>
  282. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#phone-numbers-tel">Phone numbers <code class="docutils literal notranslate"><span class="pre">tel</span></code></a></li>
  283. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#geo-coordinates-geo">Geo Coordinates <code class="docutils literal notranslate"><span class="pre">geo</span></code></a></li>
  284. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#mobile-authenticators-otpauth">Mobile Authenticators <code class="docutils literal notranslate"><span class="pre">otpauth</span></code></a></li>
  285. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#wireless-network-configuration">Wireless Network configuration</a></li>
  286. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#contact-information-vcard">Contact information: vCard</a></li>
  287. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#calendar-events-vcalendar-and-icalendar">Calendar Events: vCalendar and iCalendar</a></li>
  288. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#see-also">See also</a></li>
  289. </ul>
  290. </li>
  291. <li class="toctree-l1"><a class="reference internal" href="../Appendix/License.html">License</a></li>
  292. </ul>
  293. </div>
  294. </div>
  295. </nav>
  296. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
  297. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  298. <a href="../index.html">PHP-QRCode</a>
  299. </nav>
  300. <div class="wy-nav-content">
  301. <div class="rst-content">
  302. <div role="navigation" aria-label="Page navigation">
  303. <ul class="wy-breadcrumbs">
  304. <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
  305. <li class="breadcrumb-item active">Configuration settings</li>
  306. <li class="wy-breadcrumbs-aside">
  307. <a href="https://github.com/chillerlan/php-qrcode/blob/main/docs/Usage/Configuration-settings.md" class="fa fa-github"> Edit on GitHub</a>
  308. </li>
  309. </ul>
  310. <hr/>
  311. </div>
  312. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  313. <div itemprop="articleBody">
  314. <section id="configuration-settings">
  315. <h1>Configuration settings<a class="headerlink" href="#configuration-settings" title="Link to this heading"></a></h1>
  316. <!-- This file is auto generated from the source of QROptionsTrait.php -->
  317. <section id="version">
  318. <h2>version<a class="headerlink" href="#version" title="Link to this heading"></a></h2>
  319. <p>QR Code version number</p>
  320. <p><code class="docutils literal notranslate"><span class="pre">1</span> <span class="pre">...</span> <span class="pre">40</span></code> or <code class="docutils literal notranslate"><span class="pre">Version::AUTO</span></code> (default)</p>
  321. <p><strong>See also:</strong></p>
  322. <ul class="simple">
  323. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\Version</span></code></p></li>
  324. </ul>
  325. </section>
  326. <section id="versionmin">
  327. <h2>versionMin<a class="headerlink" href="#versionmin" title="Link to this heading"></a></h2>
  328. <p>Minimum QR version</p>
  329. <p>if <code class="docutils literal notranslate"><span class="pre">QROptions::$version</span></code> is set to <code class="docutils literal notranslate"><span class="pre">Version::AUTO</span></code> (default: 1)</p>
  330. </section>
  331. <section id="versionmax">
  332. <h2>versionMax<a class="headerlink" href="#versionmax" title="Link to this heading"></a></h2>
  333. <p>Maximum QR version</p>
  334. <p>if <code class="docutils literal notranslate"><span class="pre">QROptions::$version</span></code> is set to <code class="docutils literal notranslate"><span class="pre">Version::AUTO</span></code> (default: 40)</p>
  335. </section>
  336. <section id="ecclevel">
  337. <h2>eccLevel<a class="headerlink" href="#ecclevel" title="Link to this heading"></a></h2>
  338. <p>Error correct level</p>
  339. <p><code class="docutils literal notranslate"><span class="pre">EccLevel::X</span></code> where <code class="docutils literal notranslate"><span class="pre">X</span></code> is:</p>
  340. <ul class="simple">
  341. <li><p><code class="docutils literal notranslate"><span class="pre">L</span></code> =&gt; 7% (default)</p></li>
  342. <li><p><code class="docutils literal notranslate"><span class="pre">M</span></code> =&gt; 15%</p></li>
  343. <li><p><code class="docutils literal notranslate"><span class="pre">Q</span></code> =&gt; 25%</p></li>
  344. <li><p><code class="docutils literal notranslate"><span class="pre">H</span></code> =&gt; 30%</p></li>
  345. </ul>
  346. <p><strong>See also:</strong></p>
  347. <ul class="simple">
  348. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\EccLevel</span></code></p></li>
  349. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/discussions/160">github.com/chillerlan/php-qrcode/discussions/160</a></p></li>
  350. </ul>
  351. </section>
  352. <section id="maskpattern">
  353. <h2>maskPattern<a class="headerlink" href="#maskpattern" title="Link to this heading"></a></h2>
  354. <p>Mask Pattern to use (no value in using, mostly for unit testing purposes)</p>
  355. <p><code class="docutils literal notranslate"><span class="pre">0</span> <span class="pre">...</span> <span class="pre">7</span></code> or <code class="docutils literal notranslate"><span class="pre">MaskPattern::PATTERN_AUTO</span></code> (default)</p>
  356. <p><strong>See also:</strong></p>
  357. <ul class="simple">
  358. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\MaskPattern</span></code></p></li>
  359. </ul>
  360. </section>
  361. <section id="addquietzone">
  362. <h2>addQuietzone<a class="headerlink" href="#addquietzone" title="Link to this heading"></a></h2>
  363. <p>Add a “quiet zone” (margin) according to the QR code spec</p>
  364. <p><strong>See also:</strong></p>
  365. <ul class="simple">
  366. <li><p><a class="reference external" href="https://www.qrcode.com/en/howto/code.html">www.qrcode.com/en/howto/code.html</a></p></li>
  367. </ul>
  368. </section>
  369. <section id="quietzonesize">
  370. <h2>quietzoneSize<a class="headerlink" href="#quietzonesize" title="Link to this heading"></a></h2>
  371. <p>Size of the quiet zone</p>
  372. <p>internally clamped to <code class="docutils literal notranslate"><span class="pre">0</span> <span class="pre">...</span> <span class="pre">$moduleCount</span> <span class="pre">/</span> <span class="pre">2</span></code> (default: 4)</p>
  373. </section>
  374. <section id="outputtype">
  375. <h2>outputType<a class="headerlink" href="#outputtype" title="Link to this heading"></a></h2>
  376. <p>The built-in output type</p>
  377. <ul class="simple">
  378. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::MARKUP_SVG</span></code> (default)</p></li>
  379. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::MARKUP_HTML</span></code></p></li>
  380. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_BMP</span></code></p></li>
  381. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_GIF</span></code></p></li>
  382. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_JPG</span></code></p></li>
  383. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_PNG</span></code></p></li>
  384. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_WEBP</span></code></p></li>
  385. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::STRING_TEXT</span></code></p></li>
  386. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::STRING_JSON</span></code></p></li>
  387. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::IMAGICK</span></code></p></li>
  388. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::EPS</span></code></p></li>
  389. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::FPDF</span></code></p></li>
  390. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::CUSTOM</span></code></p></li>
  391. </ul>
  392. <p><strong>See also:</strong></p>
  393. <ul class="simple">
  394. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QREps</span></code></p></li>
  395. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRFpdf</span></code></p></li>
  396. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRGdImage</span></code></p></li>
  397. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRImagick</span></code></p></li>
  398. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRMarkupHTML</span></code></p></li>
  399. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRMarkupSVG</span></code></p></li>
  400. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRString</span></code></p></li>
  401. </ul>
  402. </section>
  403. <section id="outputinterface">
  404. <h2>outputInterface<a class="headerlink" href="#outputinterface" title="Link to this heading"></a></h2>
  405. <p>The FQCN of the custom <code class="docutils literal notranslate"><span class="pre">QROutputInterface</span></code></p>
  406. <p>if <code class="docutils literal notranslate"><span class="pre">QROptions::$outputType</span></code> is set to <code class="docutils literal notranslate"><span class="pre">QROutputInterface::CUSTOM</span></code> (default: <code class="docutils literal notranslate"><span class="pre">null</span></code>)</p>
  407. </section>
  408. <section id="returnresource">
  409. <h2>returnResource<a class="headerlink" href="#returnresource" title="Link to this heading"></a></h2>
  410. <p>Return the image resource instead of a render if applicable.</p>
  411. <ul class="simple">
  412. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code>: <code class="docutils literal notranslate"><span class="pre">resource</span></code> (PHP &lt; 8), <code class="docutils literal notranslate"><span class="pre">GdImage</span></code></p></li>
  413. <li><p><code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>: <code class="docutils literal notranslate"><span class="pre">Imagick</span></code></p></li>
  414. <li><p><code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>: <code class="docutils literal notranslate"><span class="pre">FPDF</span></code></p></li>
  415. </ul>
  416. <p>This option overrides/ignores other output settings, such as <code class="docutils literal notranslate"><span class="pre">QROptions::$cachefile</span></code>
  417. and <code class="docutils literal notranslate"><span class="pre">QROptions::$outputBase64</span></code>. (default: <code class="docutils literal notranslate"><span class="pre">false</span></code>)</p>
  418. <p><strong>See also:</strong></p>
  419. <ul class="simple">
  420. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputInterface::dump()</span></code></p></li>
  421. </ul>
  422. </section>
  423. <section id="cachefile">
  424. <h2>cachefile<a class="headerlink" href="#cachefile" title="Link to this heading"></a></h2>
  425. <p>Optional cache file path <code class="docutils literal notranslate"><span class="pre">/path/to/cache.file</span></code></p>
  426. <p>Please note that the <code class="docutils literal notranslate"><span class="pre">$file</span></code> parameter in <code class="docutils literal notranslate"><span class="pre">QRCode::render()</span></code> and <code class="docutils literal notranslate"><span class="pre">QRCode::renderMatrix()</span></code>
  427. takes precedence over the <code class="docutils literal notranslate"><span class="pre">QROptions::$cachefile</span></code> value. (default: <code class="docutils literal notranslate"><span class="pre">null</span></code>)</p>
  428. <p><strong>See also:</strong></p>
  429. <ul class="simple">
  430. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::render()</span></code></p></li>
  431. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::renderMatrix()</span></code></p></li>
  432. </ul>
  433. </section>
  434. <section id="outputbase64">
  435. <h2>outputBase64<a class="headerlink" href="#outputbase64" title="Link to this heading"></a></h2>
  436. <p>Toggle base64 data URI or raw data output (if applicable)</p>
  437. <p>(default: <code class="docutils literal notranslate"><span class="pre">true</span></code>)</p>
  438. <p><strong>See also:</strong></p>
  439. <ul class="simple">
  440. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputAbstract::toBase64DataURI()</span></code></p></li>
  441. </ul>
  442. </section>
  443. <section id="eol">
  444. <h2>eol<a class="headerlink" href="#eol" title="Link to this heading"></a></h2>
  445. <p>Newline string</p>
  446. <p>(default: <code class="docutils literal notranslate"><span class="pre">PHP_EOL</span></code>)</p>
  447. </section>
  448. <section id="bgcolor">
  449. <h2>bgColor<a class="headerlink" href="#bgcolor" title="Link to this heading"></a></h2>
  450. <p>Sets the image background color (if applicable)</p>
  451. <ul class="simple">
  452. <li><p><code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>: defaults to <code class="docutils literal notranslate"><span class="pre">&quot;white&quot;</span></code></p></li>
  453. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code>: defaults to <code class="docutils literal notranslate"><span class="pre">[255,</span> <span class="pre">255,</span> <span class="pre">255]</span></code></p></li>
  454. <li><p><code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>: defaults to blank internally (white page)</p></li>
  455. </ul>
  456. </section>
  457. <section id="invertmatrix">
  458. <h2>invertMatrix<a class="headerlink" href="#invertmatrix" title="Link to this heading"></a></h2>
  459. <p>Whether to invert the matrix (reflectance reversal)</p>
  460. <p>(default: <code class="docutils literal notranslate"><span class="pre">false</span></code>)</p>
  461. <p><strong>See also:</strong></p>
  462. <ul class="simple">
  463. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Data\QRMatrix::invert()</span></code></p></li>
  464. </ul>
  465. </section>
  466. <section id="drawlightmodules">
  467. <h2>drawLightModules<a class="headerlink" href="#drawlightmodules" title="Link to this heading"></a></h2>
  468. <p>Whether to draw the light (false) modules</p>
  469. <p>(default: <code class="docutils literal notranslate"><span class="pre">true</span></code>)</p>
  470. </section>
  471. <section id="drawcircularmodules">
  472. <h2>drawCircularModules<a class="headerlink" href="#drawcircularmodules" title="Link to this heading"></a></h2>
  473. <p>Specify whether to draw the modules as filled circles</p>
  474. <p>a note for <code class="docutils literal notranslate"><span class="pre">GdImage</span></code> output:</p>
  475. <p>if <code class="docutils literal notranslate"><span class="pre">QROptions::$scale</span></code> is less than 20, the image will be upscaled internally, then the modules will be drawn
  476. using <code class="docutils literal notranslate"><span class="pre">imagefilledellipse()</span></code> and then scaled back to the expected size</p>
  477. <p>No effect in: <code class="docutils literal notranslate"><span class="pre">QREps</span></code>, <code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>, <code class="docutils literal notranslate"><span class="pre">QRMarkupHTML</span></code></p>
  478. <p><strong>See also:</strong></p>
  479. <ul class="simple">
  480. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagefilledellipse">php.net: <code class="docutils literal notranslate"><span class="pre">\imagefilledellipse()</span></code></a></p></li>
  481. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/issues/23">github.com/chillerlan/php-qrcode/issues/23</a></p></li>
  482. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/discussions/122">github.com/chillerlan/php-qrcode/discussions/122</a></p></li>
  483. </ul>
  484. </section>
  485. <section id="circleradius">
  486. <h2>circleRadius<a class="headerlink" href="#circleradius" title="Link to this heading"></a></h2>
  487. <p>Specifies the radius of the modules when <code class="docutils literal notranslate"><span class="pre">QROptions::$drawCircularModules</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
  488. <p>(default: 0.45)</p>
  489. </section>
  490. <section id="keepassquare">
  491. <h2>keepAsSquare<a class="headerlink" href="#keepassquare" title="Link to this heading"></a></h2>
  492. <p>Specifies which module types to exclude when <code class="docutils literal notranslate"><span class="pre">QROptions::$drawCircularModules</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
  493. <p>(default: <code class="docutils literal notranslate"><span class="pre">[]</span></code>)</p>
  494. </section>
  495. <section id="connectpaths">
  496. <h2>connectPaths<a class="headerlink" href="#connectpaths" title="Link to this heading"></a></h2>
  497. <p>Whether to connect the paths for the several module types to avoid weird glitches when using gradients etc.</p>
  498. <p><strong>See also:</strong></p>
  499. <ul class="simple">
  500. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/issues/57">github.com/chillerlan/php-qrcode/issues/57</a></p></li>
  501. </ul>
  502. </section>
  503. <section id="excludefromconnect">
  504. <h2>excludeFromConnect<a class="headerlink" href="#excludefromconnect" title="Link to this heading"></a></h2>
  505. <p>Specify which paths/patterns to exclude from connecting if <code class="docutils literal notranslate"><span class="pre">QROptions::$connectPaths</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
  506. </section>
  507. <section id="modulevalues">
  508. <h2>moduleValues<a class="headerlink" href="#modulevalues" title="Link to this heading"></a></h2>
  509. <p>Module values map</p>
  510. <ul class="simple">
  511. <li><p><code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>, <code class="docutils literal notranslate"><span class="pre">QRMarkupHTML</span></code>, <code class="docutils literal notranslate"><span class="pre">QRMarkupSVG</span></code>: #ABCDEF, cssname, rgb(), rgba()…</p></li>
  512. <li><p><code class="docutils literal notranslate"><span class="pre">QREps</span></code>, <code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>, <code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code>: <code class="docutils literal notranslate"><span class="pre">[R,</span> <span class="pre">G,</span> <span class="pre">B]</span></code> // 0-255</p></li>
  513. <li><p><code class="docutils literal notranslate"><span class="pre">QREps</span></code>: <code class="docutils literal notranslate"><span class="pre">[C,</span> <span class="pre">M,</span> <span class="pre">Y,</span> <span class="pre">K]</span></code> // 0-255</p></li>
  514. </ul>
  515. <p><strong>See also:</strong></p>
  516. <ul class="simple">
  517. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputAbstract::setModuleValues()</span></code></p></li>
  518. </ul>
  519. </section>
  520. <section id="addlogospace">
  521. <h2>addLogoSpace<a class="headerlink" href="#addlogospace" title="Link to this heading"></a></h2>
  522. <p>Toggles logo space creation</p>
  523. <p><strong>See also:</strong></p>
  524. <ul class="simple">
  525. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::addMatrixModifications()</span></code></p></li>
  526. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Data\QRMatrix::setLogoSpace()</span></code></p></li>
  527. </ul>
  528. </section>
  529. <section id="logospacewidth">
  530. <h2>logoSpaceWidth<a class="headerlink" href="#logospacewidth" title="Link to this heading"></a></h2>
  531. <p>Width of the logo space</p>
  532. <p>if only <code class="docutils literal notranslate"><span class="pre">QROptions::$logoSpaceWidth</span></code> is given, the logo space is assumed a square of that size</p>
  533. </section>
  534. <section id="logospaceheight">
  535. <h2>logoSpaceHeight<a class="headerlink" href="#logospaceheight" title="Link to this heading"></a></h2>
  536. <p>Height of the logo space</p>
  537. <p>if only <code class="docutils literal notranslate"><span class="pre">QROptions::$logoSpaceHeight</span></code> is given, the logo space is assumed a square of that size</p>
  538. </section>
  539. <section id="logospacestartx">
  540. <h2>logoSpaceStartX<a class="headerlink" href="#logospacestartx" title="Link to this heading"></a></h2>
  541. <p>Optional horizontal start position of the logo space (top left corner)</p>
  542. </section>
  543. <section id="logospacestarty">
  544. <h2>logoSpaceStartY<a class="headerlink" href="#logospacestarty" title="Link to this heading"></a></h2>
  545. <p>Optional vertical start position of the logo space (top left corner)</p>
  546. </section>
  547. <section id="scale">
  548. <h2>scale<a class="headerlink" href="#scale" title="Link to this heading"></a></h2>
  549. <p>Pixel size of a QR code module</p>
  550. </section>
  551. <section id="imagetransparent">
  552. <h2>imageTransparent<a class="headerlink" href="#imagetransparent" title="Link to this heading"></a></h2>
  553. <p>Toggle transparency</p>
  554. <ul class="simple">
  555. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code> and <code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>: the given <code class="docutils literal notranslate"><span class="pre">QROptions::$transparencyColor</span></code> is set as transparent</p></li>
  556. </ul>
  557. <p><strong>See also:</strong></p>
  558. <ul class="simple">
  559. <li><p><a class="reference external" href="https://github.com/chillerlan/php-qrcode/discussions/121">github.com/chillerlan/php-qrcode/discussions/121</a></p></li>
  560. </ul>
  561. </section>
  562. <section id="transparencycolor">
  563. <h2>transparencyColor<a class="headerlink" href="#transparencycolor" title="Link to this heading"></a></h2>
  564. <p>Sets a transparency color for when <code class="docutils literal notranslate"><span class="pre">QROptions::$imageTransparent</span></code> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p>
  565. <p>Defaults to <code class="docutils literal notranslate"><span class="pre">QROptions::$bgColor</span></code>.</p>
  566. <ul class="simple">
  567. <li><p><code class="docutils literal notranslate"><span class="pre">QRGdImage</span></code>: <code class="docutils literal notranslate"><span class="pre">[R,</span> <span class="pre">G,</span> <span class="pre">B]</span></code>, this color is set as transparent in <code class="docutils literal notranslate"><span class="pre">imagecolortransparent()</span></code></p></li>
  568. <li><p><code class="docutils literal notranslate"><span class="pre">QRImagick</span></code>: <code class="docutils literal notranslate"><span class="pre">&quot;color_str&quot;</span></code>, this color is set in <code class="docutils literal notranslate"><span class="pre">Imagick::transparentPaintImage()</span></code></p></li>
  569. </ul>
  570. <p><strong>See also:</strong></p>
  571. <ul class="simple">
  572. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagecolortransparent">php.net: <code class="docutils literal notranslate"><span class="pre">\imagecolortransparent()</span></code></a></p></li>
  573. <li><p><a class="reference external" href="https://www.php.net/manual/imagick.transparentpaintimage">php.net: <code class="docutils literal notranslate"><span class="pre">\Imagick::transparentPaintImage()</span></code></a></p></li>
  574. </ul>
  575. </section>
  576. <section id="quality">
  577. <h2>quality<a class="headerlink" href="#quality" title="Link to this heading"></a></h2>
  578. <p>Compression quality</p>
  579. <p>The given value depends on the used output type:</p>
  580. <ul class="simple">
  581. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_BMP</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...1]</span></code></p></li>
  582. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_JPG</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...100]</span></code></p></li>
  583. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_WEBP</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...9]</span></code></p></li>
  584. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_PNG</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...100]</span></code></p></li>
  585. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::IMAGICK</span></code>: <code class="docutils literal notranslate"><span class="pre">[0...100]</span></code></p></li>
  586. </ul>
  587. <p><strong>See also:</strong></p>
  588. <ul class="simple">
  589. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagebmp">php.net: <code class="docutils literal notranslate"><span class="pre">\imagebmp()</span></code></a></p></li>
  590. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagejpeg">php.net: <code class="docutils literal notranslate"><span class="pre">\imagejpeg()</span></code></a></p></li>
  591. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagepng">php.net: <code class="docutils literal notranslate"><span class="pre">\imagepng()</span></code></a></p></li>
  592. <li><p><a class="reference external" href="https://www.php.net/manual/function.imagewebp">php.net: <code class="docutils literal notranslate"><span class="pre">\imagewebp()</span></code></a></p></li>
  593. <li><p><a class="reference external" href="https://www.php.net/manual/imagick.setimagecompressionquality">php.net: <code class="docutils literal notranslate"><span class="pre">\Imagick::setImageCompressionQuality()</span></code></a></p></li>
  594. </ul>
  595. </section>
  596. <section id="imagickformat">
  597. <h2>imagickFormat<a class="headerlink" href="#imagickformat" title="Link to this heading"></a></h2>
  598. <p>Imagick output format</p>
  599. <p><strong>See also:</strong></p>
  600. <ul class="simple">
  601. <li><p><a class="reference external" href="https://www.php.net/manual/imagick.setimageformat">php.net: <code class="docutils literal notranslate"><span class="pre">\Imagick::setImageFormat()</span></code></a></p></li>
  602. <li><p><a class="reference external" href="https://www.imagemagick.org/script/formats.php">www.imagemagick.org/script/formats.php</a></p></li>
  603. </ul>
  604. </section>
  605. <section id="cssclass">
  606. <h2>cssClass<a class="headerlink" href="#cssclass" title="Link to this heading"></a></h2>
  607. <p>A common css class</p>
  608. </section>
  609. <section id="markupdark">
  610. <h2>markupDark<a class="headerlink" href="#markupdark" title="Link to this heading"></a></h2>
  611. <p>Markup substitute for dark (CSS value)</p>
  612. </section>
  613. <section id="markuplight">
  614. <h2>markupLight<a class="headerlink" href="#markuplight" title="Link to this heading"></a></h2>
  615. <p>Markup substitute for light (CSS value)</p>
  616. </section>
  617. <section id="svgaddxmlheader">
  618. <h2>svgAddXmlHeader<a class="headerlink" href="#svgaddxmlheader" title="Link to this heading"></a></h2>
  619. <p>Whether to add an XML header line or not, e.g. to embed the SVG directly in HTML</p>
  620. <p><code class="docutils literal notranslate"><span class="pre">&lt;?xml</span> <span class="pre">version=&quot;1.0&quot;</span> <span class="pre">encoding=&quot;UTF-8&quot;?&gt;</span></code></p>
  621. </section>
  622. <section id="svgopacity">
  623. <h2>svgOpacity<a class="headerlink" href="#svgopacity" title="Link to this heading"></a></h2>
  624. <p>SVG path opacity</p>
  625. <p>Sets the value for the SVG “fill-opacity” on a <code class="docutils literal notranslate"><span class="pre">&lt;path&gt;</span></code> element. Only in effect when non-empty values
  626. for <code class="docutils literal notranslate"><span class="pre">QROptions::$markupDark</span></code> and <code class="docutils literal notranslate"><span class="pre">QROptions::$markupLight</span></code> are given.
  627. The opacity value is the same for all paths - please use CSS for more sophisticated implementations.</p>
  628. </section>
  629. <section id="svgdefs">
  630. <h2>svgDefs<a class="headerlink" href="#svgdefs" title="Link to this heading"></a></h2>
  631. <p>Anything in the SVG <code class="docutils literal notranslate"><span class="pre">&lt;defs&gt;</span></code> tag</p>
  632. <p><strong>See also:</strong></p>
  633. <ul class="simple">
  634. <li><p><a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs">developer.mozilla.org/en-US/docs/Web/SVG/Element/defs</a></p></li>
  635. </ul>
  636. </section>
  637. <section id="svgpreserveaspectratio">
  638. <h2>svgPreserveAspectRatio<a class="headerlink" href="#svgpreserveaspectratio" title="Link to this heading"></a></h2>
  639. <p>Sets the value for the “preserveAspectRatio” on the <code class="docutils literal notranslate"><span class="pre">&lt;svg&gt;</span></code> element</p>
  640. <p><strong>See also:</strong></p>
  641. <ul class="simple">
  642. <li><p><a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio">developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio</a></p></li>
  643. </ul>
  644. </section>
  645. <section id="textdark">
  646. <h2>textDark<a class="headerlink" href="#textdark" title="Link to this heading"></a></h2>
  647. <p>String substitute for dark</p>
  648. <p><strong>See also:</strong></p>
  649. <ul class="simple">
  650. <li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Block_Elements">en.wikipedia.org/wiki/Block_Elements</a></p></li>
  651. <li><p><a class="reference external" href="https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit">en.wikipedia.org/wiki/ANSI_escape_code#8-bit</a></p></li>
  652. </ul>
  653. </section>
  654. <section id="textlight">
  655. <h2>textLight<a class="headerlink" href="#textlight" title="Link to this heading"></a></h2>
  656. <p>String substitute for light</p>
  657. </section>
  658. <section id="textlinestart">
  659. <h2>textLineStart<a class="headerlink" href="#textlinestart" title="Link to this heading"></a></h2>
  660. <p>An optional line prefix, e.g. empty space to align the QR Code in a console</p>
  661. </section>
  662. <section id="jsonasbooleans">
  663. <h2>jsonAsBooleans<a class="headerlink" href="#jsonasbooleans" title="Link to this heading"></a></h2>
  664. <p>Whether to return matrix values in JSON as booleans or <code class="docutils literal notranslate"><span class="pre">$M_TYPE</span></code> integers</p>
  665. </section>
  666. <section id="fpdfmeasureunit">
  667. <h2>fpdfMeasureUnit<a class="headerlink" href="#fpdfmeasureunit" title="Link to this heading"></a></h2>
  668. <p>Measurement unit for <code class="docutils literal notranslate"><span class="pre">FPDF</span></code> output: <code class="docutils literal notranslate"><span class="pre">pt</span></code>, <code class="docutils literal notranslate"><span class="pre">mm</span></code>, <code class="docutils literal notranslate"><span class="pre">cm</span></code>, <code class="docutils literal notranslate"><span class="pre">in</span></code> (default: <code class="docutils literal notranslate"><span class="pre">pt</span></code>)</p>
  669. <p><strong>See also:</strong></p>
  670. <ul class="simple">
  671. <li><p><code class="docutils literal notranslate"><span class="pre">FPDF::__construct()</span></code></p></li>
  672. </ul>
  673. </section>
  674. <section id="readeruseimagickifavailable">
  675. <h2>readerUseImagickIfAvailable<a class="headerlink" href="#readeruseimagickifavailable" title="Link to this heading"></a></h2>
  676. <p>Use Imagick (if available) when reading QR Codes</p>
  677. </section>
  678. <section id="readergrayscale">
  679. <h2>readerGrayscale<a class="headerlink" href="#readergrayscale" title="Link to this heading"></a></h2>
  680. <p>Grayscale the image before reading</p>
  681. </section>
  682. <section id="readerincreasecontrast">
  683. <h2>readerIncreaseContrast<a class="headerlink" href="#readerincreasecontrast" title="Link to this heading"></a></h2>
  684. <p>Increase the contrast before reading</p>
  685. <p>note that applying contrast works different in GD and Imagick, so mileage may vary</p>
  686. </section>
  687. </section>
  688. </div>
  689. </div>
  690. <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
  691. <a href="Advanced-usage.html" class="btn btn-neutral float-left" title="Advanced usage" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
  692. <a href="../Customizing/Module-Values.html" class="btn btn-neutral float-right" title="Module values" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
  693. </div>
  694. <hr/>
  695. <div role="contentinfo">
  696. <p>&#169; Copyright 2023, smiley.</p>
  697. </div>
  698. </footer>
  699. </div>
  700. </div>
  701. </section>
  702. </div>
  703. <script>
  704. jQuery(function () {
  705. SphinxRtdTheme.Navigation.enable(true);
  706. });
  707. </script>
  708. </body>
  709. </html>