chillerlan-QRCode-Common-GDLuminanceSource.html 56 KB

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