Configuration-settings.html 54 KB

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