Configuration-settings.html 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  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-json">Load and save 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#save-to-file">Save to file</a></li>
  85. <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>
  86. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#mixed-mode">Mixed mode</a></li>
  87. <li class="toctree-l3"><a class="reference internal" href="Advanced-usage.html#qr-code-reader">QR Code reader</a></li>
  88. </ul>
  89. </li>
  90. </ul>
  91. </li>
  92. <li class="toctree-l1 current"><a class="current reference internal" href="#">Configuration settings</a><ul>
  93. <li class="toctree-l2"><a class="reference internal" href="#version">version</a></li>
  94. <li class="toctree-l2"><a class="reference internal" href="#versionmin">versionMin</a></li>
  95. <li class="toctree-l2"><a class="reference internal" href="#versionmax">versionMax</a></li>
  96. <li class="toctree-l2"><a class="reference internal" href="#ecclevel">eccLevel</a></li>
  97. <li class="toctree-l2"><a class="reference internal" href="#maskpattern">maskPattern</a></li>
  98. <li class="toctree-l2"><a class="reference internal" href="#addquietzone">addQuietzone</a></li>
  99. <li class="toctree-l2"><a class="reference internal" href="#quietzonesize">quietzoneSize</a></li>
  100. <li class="toctree-l2"><a class="reference internal" href="#outputtype">outputType</a></li>
  101. <li class="toctree-l2"><a class="reference internal" href="#outputinterface">outputInterface</a></li>
  102. <li class="toctree-l2"><a class="reference internal" href="#returnresource">returnResource</a></li>
  103. <li class="toctree-l2"><a class="reference internal" href="#cachefile">cachefile</a></li>
  104. <li class="toctree-l2"><a class="reference internal" href="#outputbase64">outputBase64</a></li>
  105. <li class="toctree-l2"><a class="reference internal" href="#eol">eol</a></li>
  106. <li class="toctree-l2"><a class="reference internal" href="#bgcolor">bgColor</a></li>
  107. <li class="toctree-l2"><a class="reference internal" href="#invertmatrix">invertMatrix</a></li>
  108. <li class="toctree-l2"><a class="reference internal" href="#drawlightmodules">drawLightModules</a></li>
  109. <li class="toctree-l2"><a class="reference internal" href="#drawcircularmodules">drawCircularModules</a></li>
  110. <li class="toctree-l2"><a class="reference internal" href="#circleradius">circleRadius</a></li>
  111. <li class="toctree-l2"><a class="reference internal" href="#keepassquare">keepAsSquare</a></li>
  112. <li class="toctree-l2"><a class="reference internal" href="#connectpaths">connectPaths</a></li>
  113. <li class="toctree-l2"><a class="reference internal" href="#excludefromconnect">excludeFromConnect</a></li>
  114. <li class="toctree-l2"><a class="reference internal" href="#modulevalues">moduleValues</a></li>
  115. <li class="toctree-l2"><a class="reference internal" href="#addlogospace">addLogoSpace</a></li>
  116. <li class="toctree-l2"><a class="reference internal" href="#logospacewidth">logoSpaceWidth</a></li>
  117. <li class="toctree-l2"><a class="reference internal" href="#logospaceheight">logoSpaceHeight</a></li>
  118. <li class="toctree-l2"><a class="reference internal" href="#logospacestartx">logoSpaceStartX</a></li>
  119. <li class="toctree-l2"><a class="reference internal" href="#logospacestarty">logoSpaceStartY</a></li>
  120. <li class="toctree-l2"><a class="reference internal" href="#scale">scale</a></li>
  121. <li class="toctree-l2"><a class="reference internal" href="#imagetransparent">imageTransparent</a></li>
  122. <li class="toctree-l2"><a class="reference internal" href="#transparencycolor">transparencyColor</a></li>
  123. <li class="toctree-l2"><a class="reference internal" href="#quality">quality</a></li>
  124. <li class="toctree-l2"><a class="reference internal" href="#imagickformat">imagickFormat</a></li>
  125. <li class="toctree-l2"><a class="reference internal" href="#cssclass">cssClass</a></li>
  126. <li class="toctree-l2"><a class="reference internal" href="#markupdark">markupDark</a></li>
  127. <li class="toctree-l2"><a class="reference internal" href="#markuplight">markupLight</a></li>
  128. <li class="toctree-l2"><a class="reference internal" href="#svgaddxmlheader">svgAddXmlHeader</a></li>
  129. <li class="toctree-l2"><a class="reference internal" href="#svgopacity">svgOpacity</a></li>
  130. <li class="toctree-l2"><a class="reference internal" href="#svgdefs">svgDefs</a></li>
  131. <li class="toctree-l2"><a class="reference internal" href="#svgpreserveaspectratio">svgPreserveAspectRatio</a></li>
  132. <li class="toctree-l2"><a class="reference internal" href="#textdark">textDark</a></li>
  133. <li class="toctree-l2"><a class="reference internal" href="#textlight">textLight</a></li>
  134. <li class="toctree-l2"><a class="reference internal" href="#textlinestart">textLineStart</a></li>
  135. <li class="toctree-l2"><a class="reference internal" href="#jsonasbooleans">jsonAsBooleans</a></li>
  136. <li class="toctree-l2"><a class="reference internal" href="#fpdfmeasureunit">fpdfMeasureUnit</a></li>
  137. <li class="toctree-l2"><a class="reference internal" href="#readeruseimagickifavailable">readerUseImagickIfAvailable</a></li>
  138. <li class="toctree-l2"><a class="reference internal" href="#readergrayscale">readerGrayscale</a></li>
  139. <li class="toctree-l2"><a class="reference internal" href="#readerincreasecontrast">readerIncreaseContrast</a></li>
  140. </ul>
  141. </li>
  142. </ul>
  143. <p class="caption" role="heading"><span class="caption-text">Customizing output</span></p>
  144. <ul>
  145. <li class="toctree-l1"><a class="reference internal" href="../Customizing/Module-Values.html">Module values</a><ul>
  146. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Module-Values.html#basics">Basics</a></li>
  147. <li class="toctree-l2"><a class="reference internal" href="../Customizing/Module-Values.html#assigning-values">Assigning values</a></li>
  148. <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>
  149. <li class="toctree-l3"><a class="reference internal" href="../Customizing/Module-Values.html#setting-module-values">Setting module values</a></li>
  150. <li class="toctree-l3"><a class="reference internal" href="../Customizing/Module-Values.html#using-the-module-values">Using the module values</a></li>
  151. </ul>
  152. </li>
  153. </ul>
  154. </li>
  155. </ul>
  156. <p class="caption" role="heading"><span class="caption-text">Built-In Output Modules</span></p>
  157. <ul>
  158. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QREps.html">QREps</a><ul>
  159. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QREps.html#example">Example</a></li>
  160. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QREps.html#additional-methods">Additional methods</a></li>
  161. <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>
  162. <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>
  163. </ul>
  164. </li>
  165. </ul>
  166. </li>
  167. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRFpdf.html">QRFpdf</a><ul>
  168. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#example">Example</a></li>
  169. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRFpdf.html#additional-methods">Additional methods</a></li>
  170. <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>
  171. <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>
  172. </ul>
  173. </li>
  174. </ul>
  175. </li>
  176. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRGdImage.html">QRGdImage</a><ul>
  177. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#example">Example</a></li>
  178. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRGdImage.html#additional-methods">Additional methods</a></li>
  179. <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>
  180. <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>
  181. </ul>
  182. </li>
  183. </ul>
  184. </li>
  185. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRImagick.html">QRImagick</a><ul>
  186. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#example">Example</a></li>
  187. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRImagick.html#additional-methods">Additional methods</a></li>
  188. <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>
  189. <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>
  190. </ul>
  191. </li>
  192. </ul>
  193. </li>
  194. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html">QRMarkupHTML</a><ul>
  195. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#example">Example</a></li>
  196. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupHTML.html#additional-methods">Additional methods</a></li>
  197. <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>
  198. <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>
  199. </ul>
  200. </li>
  201. </ul>
  202. </li>
  203. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html">QRMarkupSVG</a><ul>
  204. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#example">Example</a></li>
  205. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRMarkupSVG.html#additional-methods">Additional methods</a></li>
  206. <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>
  207. <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>
  208. </ul>
  209. </li>
  210. </ul>
  211. </li>
  212. <li class="toctree-l1"><a class="reference internal" href="../Built-In-Output/QRString.html">QRString</a><ul>
  213. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#plain-text">Plain text</a></li>
  214. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#json">JSON</a></li>
  215. <li class="toctree-l2"><a class="reference internal" href="../Built-In-Output/QRString.html#additional-methods">Additional methods</a></li>
  216. <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>
  217. <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>
  218. </ul>
  219. </li>
  220. </ul>
  221. </li>
  222. </ul>
  223. <p class="caption" role="heading"><span class="caption-text">Appendix</span></p>
  224. <ul>
  225. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Contribute.html">How to contribute</a><ul>
  226. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#questions-and-issues">Questions and issues</a></li>
  227. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#bug-reports">Bug reports</a></li>
  228. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#pull-requests-and-bug-fixes">Pull requests and bug fixes</a></li>
  229. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Contribute.html#documentation">Documentation</a></li>
  230. </ul>
  231. </li>
  232. <li class="toctree-l1"><a class="reference internal" href="../Appendix/Terminology.html">Terminology</a><ul>
  233. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#qr-code">QR Code</a></li>
  234. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#matrix">Matrix</a><ul>
  235. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#module">Module</a></li>
  236. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#version">Version</a></li>
  237. </ul>
  238. </li>
  239. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#function-patterns">Function Patterns</a><ul>
  240. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#finder-pattern">Finder Pattern</a></li>
  241. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#alignment-pattern">Alignment Pattern</a></li>
  242. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#timing-pattern">Timing Pattern</a></li>
  243. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#separators">Separators</a></li>
  244. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#quiet-zone">Quiet Zone</a></li>
  245. </ul>
  246. </li>
  247. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#encoding-region">Encoding Region</a><ul>
  248. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#data">Data</a></li>
  249. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#version-information">Version Information</a></li>
  250. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#format-information">Format Information</a></li>
  251. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#darkmodule">Darkmodule</a></li>
  252. </ul>
  253. </li>
  254. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#mode">Mode</a><ul>
  255. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#segment">Segment</a></li>
  256. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#extended-channel-interpretation-eci">Extended Channel Interpretation (ECI)</a></li>
  257. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#mixed-mode">Mixed Mode</a></li>
  258. </ul>
  259. </li>
  260. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#ecc-error-correction-coding">ECC (Error Correction Coding)</a><ul>
  261. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#ecc-level">ECC Level</a></li>
  262. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#maximum-data-capacity">Maximum data capacity</a></li>
  263. </ul>
  264. </li>
  265. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#data-masking">Data masking</a><ul>
  266. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#evaluation">Evaluation</a></li>
  267. <li class="toctree-l3"><a class="reference internal" href="../Appendix/Terminology.html#mask-pattern">Mask pattern</a></li>
  268. </ul>
  269. </li>
  270. <li class="toctree-l2"><a class="reference internal" href="../Appendix/Terminology.html#reflectance">Reflectance</a></li>
  271. </ul>
  272. </li>
  273. <li class="toctree-l1"><a class="reference internal" href="../Appendix/URI-Content.html">Popular content and URI schemes</a><ul>
  274. <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>
  275. <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>
  276. <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>
  277. <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>
  278. <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>
  279. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#wireless-network-configuration">Wireless Network configuration</a></li>
  280. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#contact-information-vcard">Contact information: vCard</a></li>
  281. <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>
  282. <li class="toctree-l2"><a class="reference internal" href="../Appendix/URI-Content.html#see-also">See also</a></li>
  283. </ul>
  284. </li>
  285. <li class="toctree-l1"><a class="reference internal" href="../Appendix/License.html">License</a></li>
  286. </ul>
  287. </div>
  288. </div>
  289. </nav>
  290. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
  291. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  292. <a href="../index.html">PHP-QRCode</a>
  293. </nav>
  294. <div class="wy-nav-content">
  295. <div class="rst-content">
  296. <div role="navigation" aria-label="Page navigation">
  297. <ul class="wy-breadcrumbs">
  298. <li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
  299. <li class="breadcrumb-item active">Configuration settings</li>
  300. <li class="wy-breadcrumbs-aside">
  301. <a href="https://github.com/chillerlan/php-qrcode/blob/main/docs/Usage/Configuration-settings.md" class="fa fa-github"> Edit on GitHub</a>
  302. </li>
  303. </ul>
  304. <hr/>
  305. </div>
  306. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  307. <div itemprop="articleBody">
  308. <section id="configuration-settings">
  309. <h1>Configuration settings<a class="headerlink" href="#configuration-settings" title="Link to this heading"></a></h1>
  310. <!-- This file is auto generated from the source of QROptionsTrait.php -->
  311. <section id="version">
  312. <h2>version<a class="headerlink" href="#version" title="Link to this heading"></a></h2>
  313. <p>QR Code version number</p>
  314. <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>
  315. <p><strong>See also:</strong></p>
  316. <ul class="simple">
  317. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\Version</span></code></p></li>
  318. </ul>
  319. </section>
  320. <section id="versionmin">
  321. <h2>versionMin<a class="headerlink" href="#versionmin" title="Link to this heading"></a></h2>
  322. <p>Minimum QR version</p>
  323. <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>
  324. </section>
  325. <section id="versionmax">
  326. <h2>versionMax<a class="headerlink" href="#versionmax" title="Link to this heading"></a></h2>
  327. <p>Maximum QR version</p>
  328. <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>
  329. </section>
  330. <section id="ecclevel">
  331. <h2>eccLevel<a class="headerlink" href="#ecclevel" title="Link to this heading"></a></h2>
  332. <p>Error correct level</p>
  333. <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>
  334. <ul class="simple">
  335. <li><p><code class="docutils literal notranslate"><span class="pre">L</span></code> =&gt; 7% (default)</p></li>
  336. <li><p><code class="docutils literal notranslate"><span class="pre">M</span></code> =&gt; 15%</p></li>
  337. <li><p><code class="docutils literal notranslate"><span class="pre">Q</span></code> =&gt; 25%</p></li>
  338. <li><p><code class="docutils literal notranslate"><span class="pre">H</span></code> =&gt; 30%</p></li>
  339. </ul>
  340. <p><strong>See also:</strong></p>
  341. <ul class="simple">
  342. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\EccLevel</span></code></p></li>
  343. <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>
  344. </ul>
  345. </section>
  346. <section id="maskpattern">
  347. <h2>maskPattern<a class="headerlink" href="#maskpattern" title="Link to this heading"></a></h2>
  348. <p>Mask Pattern to use (no value in using, mostly for unit testing purposes)</p>
  349. <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>
  350. <p><strong>See also:</strong></p>
  351. <ul class="simple">
  352. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Common\MaskPattern</span></code></p></li>
  353. </ul>
  354. </section>
  355. <section id="addquietzone">
  356. <h2>addQuietzone<a class="headerlink" href="#addquietzone" title="Link to this heading"></a></h2>
  357. <p>Add a “quiet zone” (margin) according to the QR code spec</p>
  358. <p><strong>See also:</strong></p>
  359. <ul class="simple">
  360. <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>
  361. </ul>
  362. </section>
  363. <section id="quietzonesize">
  364. <h2>quietzoneSize<a class="headerlink" href="#quietzonesize" title="Link to this heading"></a></h2>
  365. <p>Size of the quiet zone</p>
  366. <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>
  367. </section>
  368. <section id="outputtype">
  369. <h2>outputType<a class="headerlink" href="#outputtype" title="Link to this heading"></a></h2>
  370. <p>The built-in output type</p>
  371. <ul class="simple">
  372. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::MARKUP_SVG</span></code> (default)</p></li>
  373. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::MARKUP_HTML</span></code></p></li>
  374. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_BMP</span></code></p></li>
  375. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_GIF</span></code></p></li>
  376. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_JPG</span></code></p></li>
  377. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_PNG</span></code></p></li>
  378. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::GDIMAGE_WEBP</span></code></p></li>
  379. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::STRING_TEXT</span></code></p></li>
  380. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::STRING_JSON</span></code></p></li>
  381. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::IMAGICK</span></code></p></li>
  382. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::EPS</span></code></p></li>
  383. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::FPDF</span></code></p></li>
  384. <li><p><code class="docutils literal notranslate"><span class="pre">QROutputInterface::CUSTOM</span></code></p></li>
  385. </ul>
  386. <p><strong>See also:</strong></p>
  387. <ul class="simple">
  388. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QREps</span></code></p></li>
  389. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRFpdf</span></code></p></li>
  390. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRGdImage</span></code></p></li>
  391. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRImagick</span></code></p></li>
  392. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRMarkupHTML</span></code></p></li>
  393. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRMarkupSVG</span></code></p></li>
  394. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QRString</span></code></p></li>
  395. </ul>
  396. </section>
  397. <section id="outputinterface">
  398. <h2>outputInterface<a class="headerlink" href="#outputinterface" title="Link to this heading"></a></h2>
  399. <p>The FQCN of the custom <code class="docutils literal notranslate"><span class="pre">QROutputInterface</span></code></p>
  400. <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>
  401. </section>
  402. <section id="returnresource">
  403. <h2>returnResource<a class="headerlink" href="#returnresource" title="Link to this heading"></a></h2>
  404. <p>Return the image resource instead of a render if applicable.</p>
  405. <ul class="simple">
  406. <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>
  407. <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>
  408. <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>
  409. </ul>
  410. <p>This option overrides/ignores other output settings, such as <code class="docutils literal notranslate"><span class="pre">QROptions::$cachefile</span></code>
  411. 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>
  412. <p><strong>See also:</strong></p>
  413. <ul class="simple">
  414. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputInterface::dump()</span></code></p></li>
  415. </ul>
  416. </section>
  417. <section id="cachefile">
  418. <h2>cachefile<a class="headerlink" href="#cachefile" title="Link to this heading"></a></h2>
  419. <p>Optional cache file path <code class="docutils literal notranslate"><span class="pre">/path/to/cache.file</span></code></p>
  420. <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>
  421. 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>
  422. <p><strong>See also:</strong></p>
  423. <ul class="simple">
  424. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::render()</span></code></p></li>
  425. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::renderMatrix()</span></code></p></li>
  426. </ul>
  427. </section>
  428. <section id="outputbase64">
  429. <h2>outputBase64<a class="headerlink" href="#outputbase64" title="Link to this heading"></a></h2>
  430. <p>Toggle base64 data URI or raw data output (if applicable)</p>
  431. <p>(default: <code class="docutils literal notranslate"><span class="pre">true</span></code>)</p>
  432. <p><strong>See also:</strong></p>
  433. <ul class="simple">
  434. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputAbstract::toBase64DataURI()</span></code></p></li>
  435. </ul>
  436. </section>
  437. <section id="eol">
  438. <h2>eol<a class="headerlink" href="#eol" title="Link to this heading"></a></h2>
  439. <p>Newline string</p>
  440. <p>(default: <code class="docutils literal notranslate"><span class="pre">PHP_EOL</span></code>)</p>
  441. </section>
  442. <section id="bgcolor">
  443. <h2>bgColor<a class="headerlink" href="#bgcolor" title="Link to this heading"></a></h2>
  444. <p>Sets the image background color (if applicable)</p>
  445. <ul class="simple">
  446. <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>
  447. <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>
  448. <li><p><code class="docutils literal notranslate"><span class="pre">QRFpdf</span></code>: defaults to blank internally (white page)</p></li>
  449. </ul>
  450. </section>
  451. <section id="invertmatrix">
  452. <h2>invertMatrix<a class="headerlink" href="#invertmatrix" title="Link to this heading"></a></h2>
  453. <p>Whether to invert the matrix (reflectance reversal)</p>
  454. <p>(default: <code class="docutils literal notranslate"><span class="pre">false</span></code>)</p>
  455. <p><strong>See also:</strong></p>
  456. <ul class="simple">
  457. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Data\QRMatrix::invert()</span></code></p></li>
  458. </ul>
  459. </section>
  460. <section id="drawlightmodules">
  461. <h2>drawLightModules<a class="headerlink" href="#drawlightmodules" title="Link to this heading"></a></h2>
  462. <p>Whether to draw the light (false) modules</p>
  463. <p>(default: <code class="docutils literal notranslate"><span class="pre">true</span></code>)</p>
  464. </section>
  465. <section id="drawcircularmodules">
  466. <h2>drawCircularModules<a class="headerlink" href="#drawcircularmodules" title="Link to this heading"></a></h2>
  467. <p>Specify whether to draw the modules as filled circles</p>
  468. <p>a note for <code class="docutils literal notranslate"><span class="pre">GdImage</span></code> output:</p>
  469. <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
  470. using <code class="docutils literal notranslate"><span class="pre">imagefilledellipse()</span></code> and then scaled back to the expected size</p>
  471. <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>
  472. <p><strong>See also:</strong></p>
  473. <ul class="simple">
  474. <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>
  475. <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>
  476. <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>
  477. </ul>
  478. </section>
  479. <section id="circleradius">
  480. <h2>circleRadius<a class="headerlink" href="#circleradius" title="Link to this heading"></a></h2>
  481. <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>
  482. <p>(default: 0.45)</p>
  483. </section>
  484. <section id="keepassquare">
  485. <h2>keepAsSquare<a class="headerlink" href="#keepassquare" title="Link to this heading"></a></h2>
  486. <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>
  487. <p>(default: <code class="docutils literal notranslate"><span class="pre">[]</span></code>)</p>
  488. </section>
  489. <section id="connectpaths">
  490. <h2>connectPaths<a class="headerlink" href="#connectpaths" title="Link to this heading"></a></h2>
  491. <p>Whether to connect the paths for the several module types to avoid weird glitches when using gradients etc.</p>
  492. <p><strong>See also:</strong></p>
  493. <ul class="simple">
  494. <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>
  495. </ul>
  496. </section>
  497. <section id="excludefromconnect">
  498. <h2>excludeFromConnect<a class="headerlink" href="#excludefromconnect" title="Link to this heading"></a></h2>
  499. <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>
  500. </section>
  501. <section id="modulevalues">
  502. <h2>moduleValues<a class="headerlink" href="#modulevalues" title="Link to this heading"></a></h2>
  503. <p>Module values map</p>
  504. <ul class="simple">
  505. <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>
  506. <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>
  507. <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>
  508. </ul>
  509. <p><strong>See also:</strong></p>
  510. <ul class="simple">
  511. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Output\QROutputAbstract::setModuleValues()</span></code></p></li>
  512. </ul>
  513. </section>
  514. <section id="addlogospace">
  515. <h2>addLogoSpace<a class="headerlink" href="#addlogospace" title="Link to this heading"></a></h2>
  516. <p>Toggles logo space creation</p>
  517. <p><strong>See also:</strong></p>
  518. <ul class="simple">
  519. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\QRCode::addMatrixModifications()</span></code></p></li>
  520. <li><p><code class="docutils literal notranslate"><span class="pre">\chillerlan\QRCode\Data\QRMatrix::setLogoSpace()</span></code></p></li>
  521. </ul>
  522. </section>
  523. <section id="logospacewidth">
  524. <h2>logoSpaceWidth<a class="headerlink" href="#logospacewidth" title="Link to this heading"></a></h2>
  525. <p>Width of the logo space</p>
  526. <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>
  527. </section>
  528. <section id="logospaceheight">
  529. <h2>logoSpaceHeight<a class="headerlink" href="#logospaceheight" title="Link to this heading"></a></h2>
  530. <p>Height of the logo space</p>
  531. <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>
  532. </section>
  533. <section id="logospacestartx">
  534. <h2>logoSpaceStartX<a class="headerlink" href="#logospacestartx" title="Link to this heading"></a></h2>
  535. <p>Optional horizontal start position of the logo space (top left corner)</p>
  536. </section>
  537. <section id="logospacestarty">
  538. <h2>logoSpaceStartY<a class="headerlink" href="#logospacestarty" title="Link to this heading"></a></h2>
  539. <p>Optional vertical start position of the logo space (top left corner)</p>
  540. </section>
  541. <section id="scale">
  542. <h2>scale<a class="headerlink" href="#scale" title="Link to this heading"></a></h2>
  543. <p>Pixel size of a QR code module</p>
  544. </section>
  545. <section id="imagetransparent">
  546. <h2>imageTransparent<a class="headerlink" href="#imagetransparent" title="Link to this heading"></a></h2>
  547. <p>Toggle transparency</p>
  548. <ul class="simple">
  549. <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>
  550. </ul>
  551. <p><strong>See also:</strong></p>
  552. <ul class="simple">
  553. <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>
  554. </ul>
  555. </section>
  556. <section id="transparencycolor">
  557. <h2>transparencyColor<a class="headerlink" href="#transparencycolor" title="Link to this heading"></a></h2>
  558. <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>
  559. <p>Defaults to <code class="docutils literal notranslate"><span class="pre">QROptions::$bgColor</span></code>.</p>
  560. <ul class="simple">
  561. <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>
  562. <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>
  563. </ul>
  564. <p><strong>See also:</strong></p>
  565. <ul class="simple">
  566. <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>
  567. <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>
  568. </ul>
  569. </section>
  570. <section id="quality">
  571. <h2>quality<a class="headerlink" href="#quality" title="Link to this heading"></a></h2>
  572. <p>Compression quality</p>
  573. <p>The given value depends on the used output type:</p>
  574. <ul class="simple">
  575. <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>
  576. <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>
  577. <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>
  578. <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>
  579. <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>
  580. </ul>
  581. <p><strong>See also:</strong></p>
  582. <ul class="simple">
  583. <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>
  584. <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>
  585. <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>
  586. <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>
  587. <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>
  588. </ul>
  589. </section>
  590. <section id="imagickformat">
  591. <h2>imagickFormat<a class="headerlink" href="#imagickformat" title="Link to this heading"></a></h2>
  592. <p>Imagick output format</p>
  593. <p><strong>See also:</strong></p>
  594. <ul class="simple">
  595. <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>
  596. <li><p><a class="reference external" href="https://www.imagemagick.org/script/formats.php">www.imagemagick.org/script/formats.php</a></p></li>
  597. </ul>
  598. </section>
  599. <section id="cssclass">
  600. <h2>cssClass<a class="headerlink" href="#cssclass" title="Link to this heading"></a></h2>
  601. <p>A common css class</p>
  602. </section>
  603. <section id="markupdark">
  604. <h2>markupDark<a class="headerlink" href="#markupdark" title="Link to this heading"></a></h2>
  605. <p>Markup substitute for dark (CSS value)</p>
  606. </section>
  607. <section id="markuplight">
  608. <h2>markupLight<a class="headerlink" href="#markuplight" title="Link to this heading"></a></h2>
  609. <p>Markup substitute for light (CSS value)</p>
  610. </section>
  611. <section id="svgaddxmlheader">
  612. <h2>svgAddXmlHeader<a class="headerlink" href="#svgaddxmlheader" title="Link to this heading"></a></h2>
  613. <p>Whether to add an XML header line or not, e.g. to embed the SVG directly in HTML</p>
  614. <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>
  615. </section>
  616. <section id="svgopacity">
  617. <h2>svgOpacity<a class="headerlink" href="#svgopacity" title="Link to this heading"></a></h2>
  618. <p>SVG path opacity</p>
  619. <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
  620. 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.
  621. The opacity value is the same for all paths - please use CSS for more sophisticated implementations.</p>
  622. </section>
  623. <section id="svgdefs">
  624. <h2>svgDefs<a class="headerlink" href="#svgdefs" title="Link to this heading"></a></h2>
  625. <p>Anything in the SVG <code class="docutils literal notranslate"><span class="pre">&lt;defs&gt;</span></code> tag</p>
  626. <p><strong>See also:</strong></p>
  627. <ul class="simple">
  628. <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>
  629. </ul>
  630. </section>
  631. <section id="svgpreserveaspectratio">
  632. <h2>svgPreserveAspectRatio<a class="headerlink" href="#svgpreserveaspectratio" title="Link to this heading"></a></h2>
  633. <p>Sets the value for the “preserveAspectRatio” on the <code class="docutils literal notranslate"><span class="pre">&lt;svg&gt;</span></code> element</p>
  634. <p><strong>See also:</strong></p>
  635. <ul class="simple">
  636. <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>
  637. </ul>
  638. </section>
  639. <section id="textdark">
  640. <h2>textDark<a class="headerlink" href="#textdark" title="Link to this heading"></a></h2>
  641. <p>String substitute for dark</p>
  642. <p><strong>See also:</strong></p>
  643. <ul class="simple">
  644. <li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Block_Elements">en.wikipedia.org/wiki/Block_Elements</a></p></li>
  645. <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>
  646. </ul>
  647. </section>
  648. <section id="textlight">
  649. <h2>textLight<a class="headerlink" href="#textlight" title="Link to this heading"></a></h2>
  650. <p>String substitute for light</p>
  651. </section>
  652. <section id="textlinestart">
  653. <h2>textLineStart<a class="headerlink" href="#textlinestart" title="Link to this heading"></a></h2>
  654. <p>An optional line prefix, e.g. empty space to align the QR Code in a console</p>
  655. </section>
  656. <section id="jsonasbooleans">
  657. <h2>jsonAsBooleans<a class="headerlink" href="#jsonasbooleans" title="Link to this heading"></a></h2>
  658. <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>
  659. </section>
  660. <section id="fpdfmeasureunit">
  661. <h2>fpdfMeasureUnit<a class="headerlink" href="#fpdfmeasureunit" title="Link to this heading"></a></h2>
  662. <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>
  663. <p><strong>See also:</strong></p>
  664. <ul class="simple">
  665. <li><p><code class="docutils literal notranslate"><span class="pre">FPDF::__construct()</span></code></p></li>
  666. </ul>
  667. </section>
  668. <section id="readeruseimagickifavailable">
  669. <h2>readerUseImagickIfAvailable<a class="headerlink" href="#readeruseimagickifavailable" title="Link to this heading"></a></h2>
  670. <p>Use Imagick (if available) when reading QR Codes</p>
  671. </section>
  672. <section id="readergrayscale">
  673. <h2>readerGrayscale<a class="headerlink" href="#readergrayscale" title="Link to this heading"></a></h2>
  674. <p>Grayscale the image before reading</p>
  675. </section>
  676. <section id="readerincreasecontrast">
  677. <h2>readerIncreaseContrast<a class="headerlink" href="#readerincreasecontrast" title="Link to this heading"></a></h2>
  678. <p>Increase the contrast before reading</p>
  679. <p>note that applying contrast works different in GD and Imagick, so mileage may vary</p>
  680. </section>
  681. </section>
  682. </div>
  683. </div>
  684. <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
  685. <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>
  686. <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>
  687. </div>
  688. <hr/>
  689. <div role="contentinfo">
  690. <p>&#169; Copyright 2023, smiley.</p>
  691. </div>
  692. </footer>
  693. </div>
  694. </div>
  695. </section>
  696. </div>
  697. <script>
  698. jQuery(function () {
  699. SphinxRtdTheme.Navigation.enable(true);
  700. });
  701. </script>
  702. </body>
  703. </html>