chillerlan-QRCode-Common-GDLuminanceSource.html 58 KB

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