chillerlan-QRCode-Common-GDLuminanceSource.html 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. <li class="phpdocumentor-topnav__menu-item -social">
  59. <a href="https://github.com/chillerlan/php-qrcode/discussions">
  60. <span>
  61. <i class="fas fa-envelope-open-text"></i>
  62. </span>
  63. </a>
  64. </li>
  65. </ul>
  66. </nav>
  67. </header>
  68. <main class="phpdocumentor">
  69. <div class="phpdocumentor-section">
  70. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  71. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  72. Menu
  73. </label>
  74. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  75. <section class="phpdocumentor-sidebar__category -namespaces">
  76. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  77. <h4 class="phpdocumentor-sidebar__root-namespace">
  78. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  79. </h4>
  80. <ul class="phpdocumentor-list">
  81. <li>
  82. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  83. </li>
  84. <li>
  85. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  86. </li>
  87. </ul>
  88. <h4 class="phpdocumentor-sidebar__root-namespace">
  89. <a href="namespaces/output.html" class="">Output</a>
  90. </h4>
  91. </section>
  92. <section class="phpdocumentor-sidebar__category -packages">
  93. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  94. <h4 class="phpdocumentor-sidebar__root-namespace">
  95. <a href="packages/Application.html" class="">Application</a>
  96. </h4>
  97. </section>
  98. <section class="phpdocumentor-sidebar__category -reports">
  99. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  100. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  101. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  102. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  103. </section>
  104. <section class="phpdocumentor-sidebar__category -indices">
  105. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  106. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  107. </section>
  108. </aside>
  109. <div class="phpdocumentor-column -nine phpdocumentor-content">
  110. <section>
  111. <ul class="phpdocumentor-breadcrumbs">
  112. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  113. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  114. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-common.html">Common</a></li>
  115. </ul>
  116. <article class="phpdocumentor-element -class">
  117. <h2 class="phpdocumentor-content__title">
  118. GDLuminanceSource
  119. <span class="phpdocumentor-element__extends">
  120. extends <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html"><abbr title="\chillerlan\QRCode\Common\LuminanceSourceAbstract">LuminanceSourceAbstract</abbr></a>
  121. </span>
  122. <div class="phpdocumentor-element__package">
  123. in package
  124. <ul class="phpdocumentor-breadcrumbs">
  125. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  126. </ul>
  127. </div>
  128. </h2>
  129. <div class="phpdocumentor-label-line">
  130. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  131. </div>
  132. <aside class="phpdocumentor-element-found-in">
  133. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GDLuminanceSource.php"><a href="files/src-common-gdluminancesource.html"><abbr title="src/Common/GDLuminanceSource.php">GDLuminanceSource.php</abbr></a></abbr>
  134. :
  135. <span class="phpdocumentor-element-found-in__line">27</span>
  136. </aside>
  137. <p class="phpdocumentor-summary">This class is used to help decode images from files which arrive as GD Resource
  138. It does not support rotation.</p>
  139. <h3 id="toc">
  140. Table of Contents
  141. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  142. </h3>
  143. <h4 id="toc-properties">
  144. Properties
  145. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  146. </h4>
  147. <dl class="phpdocumentor-table-of-contents">
  148. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  149. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_height">$height</a>
  150. <span>
  151. &nbsp;: int </span>
  152. </dt>
  153. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  154. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_luminances">$luminances</a>
  155. <span>
  156. &nbsp;: array&lt;string|int, mixed&gt; </span>
  157. </dt>
  158. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  159. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_options">$options</a>
  160. <span>
  161. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a> </span>
  162. </dt>
  163. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  164. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_width">$width</a>
  165. <span>
  166. &nbsp;: int </span>
  167. </dt>
  168. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  169. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#property_gdImage">$gdImage</a>
  170. <span>
  171. &nbsp;: <abbr title="\GdImage">GdImage</abbr> </span>
  172. </dt>
  173. </dl>
  174. <h4 id="toc-methods">
  175. Methods
  176. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  177. </h4>
  178. <dl class="phpdocumentor-table-of-contents">
  179. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  180. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method___construct">__construct()</a>
  181. <span>
  182. &nbsp;: mixed </span>
  183. </dt>
  184. <dd>GDLuminanceSource constructor.</dd>
  185. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  186. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_fromBlob">fromBlob()</a>
  187. <span>
  188. &nbsp;: static </span>
  189. </dt>
  190. <dd>Creates a LuminanceSource instance from the given data blob</dd>
  191. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  192. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_fromFile">fromFile()</a>
  193. <span>
  194. &nbsp;: static </span>
  195. </dt>
  196. <dd>Creates a LuminanceSource instance from the given file</dd>
  197. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  198. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getHeight">getHeight()</a>
  199. <span>
  200. &nbsp;: int </span>
  201. </dt>
  202. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  203. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getLuminances">getLuminances()</a>
  204. <span>
  205. &nbsp;: array&lt;string|int, mixed&gt; </span>
  206. </dt>
  207. <dd>Fetches luminance data for the underlying bitmap. Values should be fetched using:
  208. `int luminance = array[y * width + x] &amp; 0xff`</dd>
  209. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  210. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getRow">getRow()</a>
  211. <span>
  212. &nbsp;: array&lt;string|int, mixed&gt; </span>
  213. </dt>
  214. <dd>Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  215. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  216. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  217. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  218. getLuminances() may never be called.</dd>
  219. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  220. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getWidth">getWidth()</a>
  221. <span>
  222. &nbsp;: int </span>
  223. </dt>
  224. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  225. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_checkFile">checkFile()</a>
  226. <span>
  227. &nbsp;: string </span>
  228. </dt>
  229. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  230. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_setLuminancePixel">setLuminancePixel()</a>
  231. <span>
  232. &nbsp;: void </span>
  233. </dt>
  234. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  235. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_setLuminancePixels">setLuminancePixels()</a>
  236. <span>
  237. &nbsp;: void </span>
  238. </dt>
  239. </dl>
  240. <section class="phpdocumentor-properties">
  241. <h3 class="phpdocumentor-elements__header" id="properties">
  242. Properties
  243. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  244. </h3>
  245. <article
  246. class="
  247. phpdocumentor-element
  248. -property
  249. -protected
  250. "
  251. >
  252. <h4 class="phpdocumentor-element__name" id="property_height">
  253. $height
  254. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_height" class="headerlink"><i class="fas fa-link"></i></a>
  255. <span class="phpdocumentor-element__modifiers">
  256. </span>
  257. </h4>
  258. <aside class="phpdocumentor-element-found-in">
  259. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  260. :
  261. <span class="phpdocumentor-element-found-in__line">31</span>
  262. </aside>
  263. <code class="phpdocumentor-code phpdocumentor-signature ">
  264. <span class="phpdocumentor-signature__visibility">protected</span>
  265. <span class="phpdocumentor-signature__type">int</span>
  266. <span class="phpdocumentor-signature__name">$height</span>
  267. </code>
  268. </article>
  269. <article
  270. class="
  271. phpdocumentor-element
  272. -property
  273. -protected
  274. "
  275. >
  276. <h4 class="phpdocumentor-element__name" id="property_luminances">
  277. $luminances
  278. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_luminances" class="headerlink"><i class="fas fa-link"></i></a>
  279. <span class="phpdocumentor-element__modifiers">
  280. </span>
  281. </h4>
  282. <aside class="phpdocumentor-element-found-in">
  283. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  284. :
  285. <span class="phpdocumentor-element-found-in__line">29</span>
  286. </aside>
  287. <code class="phpdocumentor-code phpdocumentor-signature ">
  288. <span class="phpdocumentor-signature__visibility">protected</span>
  289. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  290. <span class="phpdocumentor-signature__name">$luminances</span>
  291. </code>
  292. </article>
  293. <article
  294. class="
  295. phpdocumentor-element
  296. -property
  297. -protected
  298. "
  299. >
  300. <h4 class="phpdocumentor-element__name" id="property_options">
  301. $options
  302. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  303. <span class="phpdocumentor-element__modifiers">
  304. </span>
  305. </h4>
  306. <aside class="phpdocumentor-element-found-in">
  307. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  308. :
  309. <span class="phpdocumentor-element-found-in__line">28</span>
  310. </aside>
  311. <code class="phpdocumentor-code phpdocumentor-signature ">
  312. <span class="phpdocumentor-signature__visibility">protected</span>
  313. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  314. <span class="phpdocumentor-signature__name">$options</span>
  315. </code>
  316. </article>
  317. <article
  318. class="
  319. phpdocumentor-element
  320. -property
  321. -protected
  322. "
  323. >
  324. <h4 class="phpdocumentor-element__name" id="property_width">
  325. $width
  326. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_width" class="headerlink"><i class="fas fa-link"></i></a>
  327. <span class="phpdocumentor-element__modifiers">
  328. </span>
  329. </h4>
  330. <aside class="phpdocumentor-element-found-in">
  331. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  332. :
  333. <span class="phpdocumentor-element-found-in__line">30</span>
  334. </aside>
  335. <code class="phpdocumentor-code phpdocumentor-signature ">
  336. <span class="phpdocumentor-signature__visibility">protected</span>
  337. <span class="phpdocumentor-signature__type">int</span>
  338. <span class="phpdocumentor-signature__name">$width</span>
  339. </code>
  340. </article>
  341. <article
  342. class="
  343. phpdocumentor-element
  344. -property
  345. -private
  346. "
  347. >
  348. <h4 class="phpdocumentor-element__name" id="property_gdImage">
  349. $gdImage
  350. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#property_gdImage" class="headerlink"><i class="fas fa-link"></i></a>
  351. <span class="phpdocumentor-element__modifiers">
  352. </span>
  353. </h4>
  354. <aside class="phpdocumentor-element-found-in">
  355. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GDLuminanceSource.php"><a href="files/src-common-gdluminancesource.html"><abbr title="src/Common/GDLuminanceSource.php">GDLuminanceSource.php</abbr></a></abbr>
  356. :
  357. <span class="phpdocumentor-element-found-in__line">29</span>
  358. </aside>
  359. <code class="phpdocumentor-code phpdocumentor-signature ">
  360. <span class="phpdocumentor-signature__visibility">private</span>
  361. <span class="phpdocumentor-signature__type"><abbr title="\GdImage">GdImage</abbr></span>
  362. <span class="phpdocumentor-signature__name">$gdImage</span>
  363. </code>
  364. </article>
  365. </section>
  366. <section class="phpdocumentor-methods">
  367. <h3 class="phpdocumentor-elements__header" id="methods">
  368. Methods
  369. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  370. </h3>
  371. <article
  372. class="phpdocumentor-element
  373. -method
  374. -public
  375. "
  376. >
  377. <h4 class="phpdocumentor-element__name" id="method___construct">
  378. __construct()
  379. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  380. </h4>
  381. <aside class="phpdocumentor-element-found-in">
  382. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GDLuminanceSource.php"><a href="files/src-common-gdluminancesource.html"><abbr title="src/Common/GDLuminanceSource.php">GDLuminanceSource.php</abbr></a></abbr>
  383. :
  384. <span class="phpdocumentor-element-found-in__line">36</span>
  385. </aside>
  386. <p class="phpdocumentor-summary">GDLuminanceSource constructor.</p>
  387. <code class="phpdocumentor-code phpdocumentor-signature ">
  388. <span class="phpdocumentor-signature__visibility">public</span>
  389. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\GdImage">GdImage</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$gdImage</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$options</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">new QROptions()</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  390. <div class="phpdocumentor-label-line">
  391. </div>
  392. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  393. <dl class="phpdocumentor-argument-list">
  394. <dt class="phpdocumentor-argument-list__entry">
  395. <span class="phpdocumentor-signature__argument__name">$gdImage</span>
  396. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\GdImage">GdImage</abbr></span>
  397. </dt>
  398. <dd class="phpdocumentor-argument-list__definition">
  399. </dd>
  400. <dt class="phpdocumentor-argument-list__entry">
  401. <span class="phpdocumentor-signature__argument__name">$options</span>
  402. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  403. = <span class="phpdocumentor-signature__argument__default-value">new QROptions()</span> </dt>
  404. <dd class="phpdocumentor-argument-list__definition">
  405. </dd>
  406. </dl>
  407. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  408. Tags
  409. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method___construct#tags" class="headerlink"><i class="fas fa-link"></i></a>
  410. </h5>
  411. <dl class="phpdocumentor-tag-list">
  412. <dt class="phpdocumentor-tag-list__entry">
  413. <span class="phpdocumentor-tag__name">throws</span>
  414. </dt>
  415. <dd class="phpdocumentor-tag-list__definition">
  416. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  417. </dd>
  418. </dl>
  419. </article>
  420. <article
  421. class="phpdocumentor-element
  422. -method
  423. -public
  424. -static "
  425. >
  426. <h4 class="phpdocumentor-element__name" id="method_fromBlob">
  427. fromBlob()
  428. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_fromBlob" class="headerlink"><i class="fas fa-link"></i></a>
  429. </h4>
  430. <aside class="phpdocumentor-element-found-in">
  431. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GDLuminanceSource.php"><a href="files/src-common-gdluminancesource.html"><abbr title="src/Common/GDLuminanceSource.php">GDLuminanceSource.php</abbr></a></abbr>
  432. :
  433. <span class="phpdocumentor-element-found-in__line">79</span>
  434. </aside>
  435. <p class="phpdocumentor-summary">Creates a LuminanceSource instance from the given data blob</p>
  436. <code class="phpdocumentor-code phpdocumentor-signature ">
  437. <span class="phpdocumentor-signature__visibility">public</span>
  438. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">fromBlob</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$blob</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$options</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">new QROptions()</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">static</span></code>
  439. <div class="phpdocumentor-label-line">
  440. </div>
  441. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  442. <dl class="phpdocumentor-argument-list">
  443. <dt class="phpdocumentor-argument-list__entry">
  444. <span class="phpdocumentor-signature__argument__name">$blob</span>
  445. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  446. </dt>
  447. <dd class="phpdocumentor-argument-list__definition">
  448. </dd>
  449. <dt class="phpdocumentor-argument-list__entry">
  450. <span class="phpdocumentor-signature__argument__name">$options</span>
  451. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  452. = <span class="phpdocumentor-signature__argument__default-value">new QROptions()</span> </dt>
  453. <dd class="phpdocumentor-argument-list__definition">
  454. </dd>
  455. </dl>
  456. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  457. Tags
  458. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_fromBlob#tags" class="headerlink"><i class="fas fa-link"></i></a>
  459. </h5>
  460. <dl class="phpdocumentor-tag-list">
  461. <dt class="phpdocumentor-tag-list__entry">
  462. <span class="phpdocumentor-tag__name">inheritDoc</span>
  463. </dt>
  464. <dd class="phpdocumentor-tag-list__definition">
  465. </dd>
  466. </dl>
  467. <section>
  468. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  469. <span class="phpdocumentor-signature__response_type">static</span>
  470. </section>
  471. </article>
  472. <article
  473. class="phpdocumentor-element
  474. -method
  475. -public
  476. -static "
  477. >
  478. <h4 class="phpdocumentor-element__name" id="method_fromFile">
  479. fromFile()
  480. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_fromFile" class="headerlink"><i class="fas fa-link"></i></a>
  481. </h4>
  482. <aside class="phpdocumentor-element-found-in">
  483. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GDLuminanceSource.php"><a href="files/src-common-gdluminancesource.html"><abbr title="src/Common/GDLuminanceSource.php">GDLuminanceSource.php</abbr></a></abbr>
  484. :
  485. <span class="phpdocumentor-element-found-in__line">74</span>
  486. </aside>
  487. <p class="phpdocumentor-summary">Creates a LuminanceSource instance from the given file</p>
  488. <code class="phpdocumentor-code phpdocumentor-signature ">
  489. <span class="phpdocumentor-signature__visibility">public</span>
  490. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">fromFile</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$path</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$options</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">new QROptions()</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">static</span></code>
  491. <div class="phpdocumentor-label-line">
  492. </div>
  493. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  494. <dl class="phpdocumentor-argument-list">
  495. <dt class="phpdocumentor-argument-list__entry">
  496. <span class="phpdocumentor-signature__argument__name">$path</span>
  497. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  498. </dt>
  499. <dd class="phpdocumentor-argument-list__definition">
  500. </dd>
  501. <dt class="phpdocumentor-argument-list__entry">
  502. <span class="phpdocumentor-signature__argument__name">$options</span>
  503. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  504. = <span class="phpdocumentor-signature__argument__default-value">new QROptions()</span> </dt>
  505. <dd class="phpdocumentor-argument-list__definition">
  506. </dd>
  507. </dl>
  508. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  509. Tags
  510. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_fromFile#tags" class="headerlink"><i class="fas fa-link"></i></a>
  511. </h5>
  512. <dl class="phpdocumentor-tag-list">
  513. <dt class="phpdocumentor-tag-list__entry">
  514. <span class="phpdocumentor-tag__name">inheritDoc</span>
  515. </dt>
  516. <dd class="phpdocumentor-tag-list__definition">
  517. </dd>
  518. </dl>
  519. <section>
  520. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  521. <span class="phpdocumentor-signature__response_type">static</span>
  522. </section>
  523. </article>
  524. <article
  525. class="phpdocumentor-element
  526. -method
  527. -public
  528. "
  529. >
  530. <h4 class="phpdocumentor-element__name" id="method_getHeight">
  531. getHeight()
  532. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getHeight" class="headerlink"><i class="fas fa-link"></i></a>
  533. </h4>
  534. <aside class="phpdocumentor-element-found-in">
  535. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  536. :
  537. <span class="phpdocumentor-element-found-in__line">55</span>
  538. </aside>
  539. <code class="phpdocumentor-code phpdocumentor-signature ">
  540. <span class="phpdocumentor-signature__visibility">public</span>
  541. <span class="phpdocumentor-signature__name">getHeight</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  542. <div class="phpdocumentor-label-line">
  543. </div>
  544. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  545. Tags
  546. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getHeight#tags" class="headerlink"><i class="fas fa-link"></i></a>
  547. </h5>
  548. <dl class="phpdocumentor-tag-list">
  549. <dt class="phpdocumentor-tag-list__entry">
  550. <span class="phpdocumentor-tag__name">inheritDoc</span>
  551. </dt>
  552. <dd class="phpdocumentor-tag-list__definition">
  553. </dd>
  554. </dl>
  555. <section>
  556. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  557. <span class="phpdocumentor-signature__response_type">int</span>
  558. &mdash;
  559. <section class="phpdocumentor-description"><p>The height of the bitmap.</p>
  560. </section>
  561. </section>
  562. </article>
  563. <article
  564. class="phpdocumentor-element
  565. -method
  566. -public
  567. "
  568. >
  569. <h4 class="phpdocumentor-element__name" id="method_getLuminances">
  570. getLuminances()
  571. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getLuminances" class="headerlink"><i class="fas fa-link"></i></a>
  572. </h4>
  573. <aside class="phpdocumentor-element-found-in">
  574. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  575. :
  576. <span class="phpdocumentor-element-found-in__line">45</span>
  577. </aside>
  578. <p class="phpdocumentor-summary">Fetches luminance data for the underlying bitmap. Values should be fetched using:
  579. `int luminance = array[y * width + x] &amp; 0xff`</p>
  580. <code class="phpdocumentor-code phpdocumentor-signature ">
  581. <span class="phpdocumentor-signature__visibility">public</span>
  582. <span class="phpdocumentor-signature__name">getLuminances</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  583. <div class="phpdocumentor-label-line">
  584. </div>
  585. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  586. Tags
  587. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getLuminances#tags" class="headerlink"><i class="fas fa-link"></i></a>
  588. </h5>
  589. <dl class="phpdocumentor-tag-list">
  590. <dt class="phpdocumentor-tag-list__entry">
  591. <span class="phpdocumentor-tag__name">inheritDoc</span>
  592. </dt>
  593. <dd class="phpdocumentor-tag-list__definition">
  594. </dd>
  595. </dl>
  596. <section>
  597. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  598. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  599. &mdash;
  600. <section class="phpdocumentor-description"><p>A row-major 2D array of luminance values. Do not use result $length as it may be
  601. larger than $width * $height bytes on some platforms. Do not modify the contents
  602. of the result.</p>
  603. </section>
  604. </section>
  605. </article>
  606. <article
  607. class="phpdocumentor-element
  608. -method
  609. -public
  610. "
  611. >
  612. <h4 class="phpdocumentor-element__name" id="method_getRow">
  613. getRow()
  614. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getRow" class="headerlink"><i class="fas fa-link"></i></a>
  615. </h4>
  616. <aside class="phpdocumentor-element-found-in">
  617. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  618. :
  619. <span class="phpdocumentor-element-found-in__line">60</span>
  620. </aside>
  621. <p class="phpdocumentor-summary">Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  622. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  623. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  624. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  625. getLuminances() may never be called.</p>
  626. <code class="phpdocumentor-code phpdocumentor-signature ">
  627. <span class="phpdocumentor-signature__visibility">public</span>
  628. <span class="phpdocumentor-signature__name">getRow</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$y</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  629. <div class="phpdocumentor-label-line">
  630. </div>
  631. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  632. <dl class="phpdocumentor-argument-list">
  633. <dt class="phpdocumentor-argument-list__entry">
  634. <span class="phpdocumentor-signature__argument__name">$y</span>
  635. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  636. </dt>
  637. <dd class="phpdocumentor-argument-list__definition">
  638. <section class="phpdocumentor-description"><p>The row to fetch, which must be in [0,getHeight())</p>
  639. </section>
  640. </dd>
  641. </dl>
  642. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  643. Tags
  644. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getRow#tags" class="headerlink"><i class="fas fa-link"></i></a>
  645. </h5>
  646. <dl class="phpdocumentor-tag-list">
  647. <dt class="phpdocumentor-tag-list__entry">
  648. <span class="phpdocumentor-tag__name">inheritDoc</span>
  649. </dt>
  650. <dd class="phpdocumentor-tag-list__definition">
  651. </dd>
  652. </dl>
  653. <section>
  654. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  655. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  656. &mdash;
  657. <section class="phpdocumentor-description"><p>An array containing the luminance data.</p>
  658. </section>
  659. </section>
  660. </article>
  661. <article
  662. class="phpdocumentor-element
  663. -method
  664. -public
  665. "
  666. >
  667. <h4 class="phpdocumentor-element__name" id="method_getWidth">
  668. getWidth()
  669. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getWidth" class="headerlink"><i class="fas fa-link"></i></a>
  670. </h4>
  671. <aside class="phpdocumentor-element-found-in">
  672. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  673. :
  674. <span class="phpdocumentor-element-found-in__line">50</span>
  675. </aside>
  676. <code class="phpdocumentor-code phpdocumentor-signature ">
  677. <span class="phpdocumentor-signature__visibility">public</span>
  678. <span class="phpdocumentor-signature__name">getWidth</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  679. <div class="phpdocumentor-label-line">
  680. </div>
  681. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  682. Tags
  683. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getWidth#tags" class="headerlink"><i class="fas fa-link"></i></a>
  684. </h5>
  685. <dl class="phpdocumentor-tag-list">
  686. <dt class="phpdocumentor-tag-list__entry">
  687. <span class="phpdocumentor-tag__name">inheritDoc</span>
  688. </dt>
  689. <dd class="phpdocumentor-tag-list__definition">
  690. </dd>
  691. </dl>
  692. <section>
  693. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  694. <span class="phpdocumentor-signature__response_type">int</span>
  695. &mdash;
  696. <section class="phpdocumentor-description"><p>The width of the bitmap.</p>
  697. </section>
  698. </section>
  699. </article>
  700. <article
  701. class="phpdocumentor-element
  702. -method
  703. -protected
  704. -static "
  705. >
  706. <h4 class="phpdocumentor-element__name" id="method_checkFile">
  707. checkFile()
  708. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_checkFile" class="headerlink"><i class="fas fa-link"></i></a>
  709. </h4>
  710. <aside class="phpdocumentor-element-found-in">
  711. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  712. :
  713. <span class="phpdocumentor-element-found-in__line">87</span>
  714. </aside>
  715. <code class="phpdocumentor-code phpdocumentor-signature ">
  716. <span class="phpdocumentor-signature__visibility">protected</span>
  717. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">checkFile</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$path</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  718. <div class="phpdocumentor-label-line">
  719. </div>
  720. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  721. <dl class="phpdocumentor-argument-list">
  722. <dt class="phpdocumentor-argument-list__entry">
  723. <span class="phpdocumentor-signature__argument__name">$path</span>
  724. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  725. </dt>
  726. <dd class="phpdocumentor-argument-list__definition">
  727. </dd>
  728. </dl>
  729. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  730. Tags
  731. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_checkFile#tags" class="headerlink"><i class="fas fa-link"></i></a>
  732. </h5>
  733. <dl class="phpdocumentor-tag-list">
  734. <dt class="phpdocumentor-tag-list__entry">
  735. <span class="phpdocumentor-tag__name">throws</span>
  736. </dt>
  737. <dd class="phpdocumentor-tag-list__definition">
  738. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  739. </dd>
  740. </dl>
  741. <section>
  742. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  743. <span class="phpdocumentor-signature__response_type">string</span>
  744. </section>
  745. </article>
  746. <article
  747. class="phpdocumentor-element
  748. -method
  749. -protected
  750. "
  751. >
  752. <h4 class="phpdocumentor-element__name" id="method_setLuminancePixel">
  753. setLuminancePixel()
  754. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_setLuminancePixel" class="headerlink"><i class="fas fa-link"></i></a>
  755. </h4>
  756. <aside class="phpdocumentor-element-found-in">
  757. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  758. :
  759. <span class="phpdocumentor-element-found-in__line">76</span>
  760. </aside>
  761. <code class="phpdocumentor-code phpdocumentor-signature ">
  762. <span class="phpdocumentor-signature__visibility">protected</span>
  763. <span class="phpdocumentor-signature__name">setLuminancePixel</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$r</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$g</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$b</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  764. <div class="phpdocumentor-label-line">
  765. </div>
  766. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  767. <dl class="phpdocumentor-argument-list">
  768. <dt class="phpdocumentor-argument-list__entry">
  769. <span class="phpdocumentor-signature__argument__name">$r</span>
  770. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  771. </dt>
  772. <dd class="phpdocumentor-argument-list__definition">
  773. </dd>
  774. <dt class="phpdocumentor-argument-list__entry">
  775. <span class="phpdocumentor-signature__argument__name">$g</span>
  776. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  777. </dt>
  778. <dd class="phpdocumentor-argument-list__definition">
  779. </dd>
  780. <dt class="phpdocumentor-argument-list__entry">
  781. <span class="phpdocumentor-signature__argument__name">$b</span>
  782. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  783. </dt>
  784. <dd class="phpdocumentor-argument-list__definition">
  785. </dd>
  786. </dl>
  787. </article>
  788. <article
  789. class="phpdocumentor-element
  790. -method
  791. -private
  792. "
  793. >
  794. <h4 class="phpdocumentor-element__name" id="method_setLuminancePixels">
  795. setLuminancePixels()
  796. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_setLuminancePixels" class="headerlink"><i class="fas fa-link"></i></a>
  797. </h4>
  798. <aside class="phpdocumentor-element-found-in">
  799. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GDLuminanceSource.php"><a href="files/src-common-gdluminancesource.html"><abbr title="src/Common/GDLuminanceSource.php">GDLuminanceSource.php</abbr></a></abbr>
  800. :
  801. <span class="phpdocumentor-element-found-in__line">60</span>
  802. </aside>
  803. <code class="phpdocumentor-code phpdocumentor-signature ">
  804. <span class="phpdocumentor-signature__visibility">private</span>
  805. <span class="phpdocumentor-signature__name">setLuminancePixels</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  806. <div class="phpdocumentor-label-line">
  807. </div>
  808. </article>
  809. </section>
  810. <div class="phpdocumentor-modal" id="source-view">
  811. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  812. <div class="phpdocumentor-modal-container">
  813. <div class="phpdocumentor-modal-content">
  814. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Common/GDLuminanceSource.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  815. </div>
  816. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  817. </div>
  818. </div>
  819. <script type="text/javascript">
  820. (function () {
  821. function loadExternalCodeSnippet(el, url, line) {
  822. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  823. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  824. const language = 'php';
  825. const code = document.createElement('code');
  826. code.className = 'language-' + language;
  827. pre.textContent = '';
  828. pre.setAttribute('data-line', line)
  829. code.textContent = 'Loading…';
  830. pre.appendChild(code);
  831. var xhr = new XMLHttpRequest();
  832. xhr.open('GET', src, true);
  833. xhr.onreadystatechange = function () {
  834. if (xhr.readyState !== 4) {
  835. return;
  836. }
  837. if (xhr.status < 400 && xhr.responseText) {
  838. code.textContent = xhr.responseText;
  839. Prism.highlightElement(code);
  840. return;
  841. }
  842. if (xhr.status === 404) {
  843. code.textContent = '✖ Error: File could not be found';
  844. return;
  845. }
  846. if (xhr.status >= 400) {
  847. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  848. return;
  849. }
  850. code.textContent = '✖ Error: An unknown error occurred';
  851. };
  852. xhr.send(null);
  853. });
  854. }
  855. const modalButtons = document.querySelectorAll("[data-modal]");
  856. const openedAsLocalFile = window.location.protocol === 'file:';
  857. if (modalButtons.length > 0 && openedAsLocalFile) {
  858. console.warn(
  859. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  860. 'browsers block XHR requests when a page is opened this way'
  861. );
  862. }
  863. modalButtons.forEach(function (trigger) {
  864. if (openedAsLocalFile) {
  865. trigger.setAttribute("hidden", "hidden");
  866. }
  867. trigger.addEventListener("click", function (event) {
  868. event.preventDefault();
  869. const modal = document.getElementById(trigger.dataset.modal);
  870. if (!modal) {
  871. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  872. return;
  873. }
  874. modal.classList.add("phpdocumentor-modal__open");
  875. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  876. const exits = modal.querySelectorAll("[data-exit-button]");
  877. exits.forEach(function (exit) {
  878. exit.addEventListener("click", function (event) {
  879. event.preventDefault();
  880. modal.classList.remove("phpdocumentor-modal__open");
  881. });
  882. });
  883. });
  884. });
  885. })();
  886. </script>
  887. </article>
  888. </section>
  889. <section class="phpdocumentor-on-this-page__sidebar">
  890. <section class="phpdocumentor-on-this-page__content">
  891. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  892. <ul class="phpdocumentor-list -clean">
  893. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  894. <li>
  895. <ul class="phpdocumentor-list -clean">
  896. <li><a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#toc-properties">Properties</a></li>
  897. <li><a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#toc-methods">Methods</a></li>
  898. </ul>
  899. </li>
  900. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  901. <li>
  902. <ul class="phpdocumentor-list -clean">
  903. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_height">$height<a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html"></li>
  904. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_luminances">$luminances<a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html"></li>
  905. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_options">$options<a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html"></li>
  906. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_width">$width<a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html"></li>
  907. <li><a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#property_gdImage">$gdImage<a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html"></li>
  908. </ul>
  909. </li>
  910. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  911. <li>
  912. <ul class="phpdocumentor-list -clean">
  913. <li><a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method___construct">__construct()</a></li>
  914. <li><a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_fromBlob">fromBlob()</a></li>
  915. <li><a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_fromFile">fromFile()</a></li>
  916. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getHeight">getHeight()</a></li>
  917. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getLuminances">getLuminances()</a></li>
  918. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getRow">getRow()</a></li>
  919. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getWidth">getWidth()</a></li>
  920. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_checkFile">checkFile()</a></li>
  921. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_setLuminancePixel">setLuminancePixel()</a></li>
  922. <li><a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#method_setLuminancePixels">setLuminancePixels()</a></li>
  923. </ul>
  924. </li>
  925. </ul>
  926. </section>
  927. </section>
  928. </div>
  929. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  930. <section class="phpdocumentor-search-results__dialog">
  931. <header class="phpdocumentor-search-results__header">
  932. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  933. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  934. </header>
  935. <section class="phpdocumentor-search-results__body">
  936. <ul class="phpdocumentor-search-results__entries"></ul>
  937. </section>
  938. </section>
  939. </section>
  940. </div>
  941. <a href="classes/chillerlan-QRCode-Common-GDLuminanceSource.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  942. </main>
  943. <script>
  944. cssVars({});
  945. </script>
  946. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  947. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  948. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  949. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  950. </body>
  951. </html>