chillerlan-QRCode-Common-GDLuminanceSource.html 59 KB

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