chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  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=Source+Sans+Pro:wght@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/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace">
  56. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  57. </h4>
  58. <ul class="phpdocumentor-list">
  59. <li>
  60. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  61. </li>
  62. <li>
  63. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  64. </li>
  65. </ul>
  66. </section>
  67. <section class="phpdocumentor-sidebar__category">
  68. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  69. <h4 class="phpdocumentor-sidebar__root-namespace">
  70. <a href="packages/Application.html" class="">Application</a>
  71. </h4>
  72. </section>
  73. <section class="phpdocumentor-sidebar__category">
  74. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  75. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  76. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  78. </section>
  79. <section class="phpdocumentor-sidebar__category">
  80. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  81. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  82. </section>
  83. </aside>
  84. <div class="phpdocumentor-column -eight phpdocumentor-content">
  85. <ul class="phpdocumentor-breadcrumbs">
  86. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  87. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  88. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-decoder.html">Decoder</a></li>
  89. </ul>
  90. <article class="phpdocumentor-element -class">
  91. <h2 class="phpdocumentor-content__title">
  92. LuminanceSourceAbstract
  93. <div class="phpdocumentor-element__package">
  94. in package
  95. <ul class="phpdocumentor-breadcrumbs">
  96. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  97. </ul>
  98. </div>
  99. <span class="phpdocumentor-element__implements">
  100. implements
  101. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Decoder\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a> </span>
  102. </h2>
  103. <aside class="phpdocumentor-element-found-in">
  104. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  105. :
  106. <span class="phpdocumentor-element-found-in__line">28</span>
  107. </aside>
  108. <p class="phpdocumentor-summary">The purpose of this class hierarchy is to abstract different bitmap implementations across
  109. platforms into a standard interface for requesting greyscale luminance values. The interface
  110. only provides immutable methods; therefore crop and rotation create copies. This is to ensure
  111. that one Reader does not modify the original luminance source and leave it in an unknown state
  112. for other Readers in the chain.</p>
  113. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  114. Tags
  115. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  116. </h5>
  117. <dl class="phpdocumentor-tag-list">
  118. <dt class="phpdocumentor-tag-list__entry">
  119. <span class="phpdocumentor-tag__name">author</span>
  120. </dt>
  121. <dd class="phpdocumentor-tag-list__definition">
  122. <section class="phpdocumentor-description"><p>dswitkin@google.com (Daniel Switkin)</p>
  123. </section>
  124. </dd>
  125. </dl>
  126. <h3 id="interfaces_class_traits">
  127. Interfaces, Classes, Traits and Enums
  128. <a href="#interfaces_class_traits" class="headerlink"><i class="fas fa-link"></i></a>
  129. </h3>
  130. <dl class="phpdocumentor-table-of-contents">
  131. <dt class="phpdocumentor-table-of-contents__entry -interface"><a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Decoder\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a></dt>
  132. <dd></dd>
  133. </dl>
  134. <h3 id="toc">
  135. Table of Contents
  136. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  137. </h3>
  138. <dl class="phpdocumentor-table-of-contents">
  139. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  140. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_height">$height</a>
  141. <span>
  142. &nbsp;: int </span>
  143. </dt>
  144. <dd></dd>
  145. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  146. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_luminances">$luminances</a>
  147. <span>
  148. &nbsp;: array&lt;string|int, mixed&gt; </span>
  149. </dt>
  150. <dd></dd>
  151. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  152. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_options">$options</a>
  153. <span>
  154. &nbsp;: <abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr> </span>
  155. </dt>
  156. <dd></dd>
  157. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  158. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_width">$width</a>
  159. <span>
  160. &nbsp;: int </span>
  161. </dt>
  162. <dd></dd>
  163. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  164. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method___construct">__construct()</a>
  165. <span>
  166. &nbsp;: mixed </span>
  167. </dt>
  168. <dd></dd>
  169. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  170. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getHeight">getHeight()</a>
  171. <span>
  172. &nbsp;: int </span>
  173. </dt>
  174. <dd></dd>
  175. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  176. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getLuminances">getLuminances()</a>
  177. <span>
  178. &nbsp;: array&lt;string|int, mixed&gt; </span>
  179. </dt>
  180. <dd>Fetches luminance data for the underlying bitmap. Values should be fetched using:
  181. `int luminance = array[y * width + x] &amp; 0xff`</dd>
  182. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  183. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getRow">getRow()</a>
  184. <span>
  185. &nbsp;: array&lt;string|int, mixed&gt; </span>
  186. </dt>
  187. <dd>Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  188. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  189. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  190. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  191. getLuminances() may never be called.</dd>
  192. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  193. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getWidth">getWidth()</a>
  194. <span>
  195. &nbsp;: int </span>
  196. </dt>
  197. <dd></dd>
  198. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  199. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_checkFile">checkFile()</a>
  200. <span>
  201. &nbsp;: string </span>
  202. </dt>
  203. <dd></dd>
  204. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  205. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_setLuminancePixel">setLuminancePixel()</a>
  206. <span>
  207. &nbsp;: void </span>
  208. </dt>
  209. <dd></dd>
  210. </dl>
  211. <section class="phpdocumentor-properties">
  212. <h3 class="phpdocumentor-elements__header" id="properties">
  213. Properties
  214. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  215. </h3>
  216. <article
  217. class="
  218. phpdocumentor-element
  219. -property
  220. -protected
  221. "
  222. >
  223. <h4 class="phpdocumentor-element__name" id="property_height">
  224. $height
  225. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_height" class="headerlink"><i class="fas fa-link"></i></a>
  226. <span class="phpdocumentor-element__modifiers">
  227. </span>
  228. </h4>
  229. <aside class="phpdocumentor-element-found-in">
  230. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  231. :
  232. <span class="phpdocumentor-element-found-in__line">34</span>
  233. </aside>
  234. <code class="phpdocumentor-code phpdocumentor-signature ">
  235. <span class="phpdocumentor-signature__visibility">protected</span>
  236. <span class="phpdocumentor-signature__type">int</span>
  237. <span class="phpdocumentor-signature__name">$height</span>
  238. </code>
  239. <section class="phpdocumentor-description"></section>
  240. <section class="phpdocumentor-description"></section>
  241. </article>
  242. <article
  243. class="
  244. phpdocumentor-element
  245. -property
  246. -protected
  247. "
  248. >
  249. <h4 class="phpdocumentor-element__name" id="property_luminances">
  250. $luminances
  251. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_luminances" class="headerlink"><i class="fas fa-link"></i></a>
  252. <span class="phpdocumentor-element__modifiers">
  253. </span>
  254. </h4>
  255. <aside class="phpdocumentor-element-found-in">
  256. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  257. :
  258. <span class="phpdocumentor-element-found-in__line">32</span>
  259. </aside>
  260. <code class="phpdocumentor-code phpdocumentor-signature ">
  261. <span class="phpdocumentor-signature__visibility">protected</span>
  262. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  263. <span class="phpdocumentor-signature__name">$luminances</span>
  264. </code>
  265. <section class="phpdocumentor-description"></section>
  266. <section class="phpdocumentor-description"></section>
  267. </article>
  268. <article
  269. class="
  270. phpdocumentor-element
  271. -property
  272. -protected
  273. "
  274. >
  275. <h4 class="phpdocumentor-element__name" id="property_options">
  276. $options
  277. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  278. <span class="phpdocumentor-element__modifiers">
  279. </span>
  280. </h4>
  281. <aside class="phpdocumentor-element-found-in">
  282. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  283. :
  284. <span class="phpdocumentor-element-found-in__line">31</span>
  285. </aside>
  286. <code class="phpdocumentor-code phpdocumentor-signature ">
  287. <span class="phpdocumentor-signature__visibility">protected</span>
  288. <span class="phpdocumentor-signature__type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  289. <span class="phpdocumentor-signature__name">$options</span>
  290. </code>
  291. </article>
  292. <article
  293. class="
  294. phpdocumentor-element
  295. -property
  296. -protected
  297. "
  298. >
  299. <h4 class="phpdocumentor-element__name" id="property_width">
  300. $width
  301. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_width" class="headerlink"><i class="fas fa-link"></i></a>
  302. <span class="phpdocumentor-element__modifiers">
  303. </span>
  304. </h4>
  305. <aside class="phpdocumentor-element-found-in">
  306. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  307. :
  308. <span class="phpdocumentor-element-found-in__line">33</span>
  309. </aside>
  310. <code class="phpdocumentor-code phpdocumentor-signature ">
  311. <span class="phpdocumentor-signature__visibility">protected</span>
  312. <span class="phpdocumentor-signature__type">int</span>
  313. <span class="phpdocumentor-signature__name">$width</span>
  314. </code>
  315. <section class="phpdocumentor-description"></section>
  316. <section class="phpdocumentor-description"></section>
  317. </article>
  318. </section>
  319. <section class="phpdocumentor-methods">
  320. <h3 class="phpdocumentor-elements__header" id="methods">
  321. Methods
  322. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  323. </h3>
  324. <article
  325. class="phpdocumentor-element
  326. -method
  327. -public
  328. "
  329. >
  330. <h4 class="phpdocumentor-element__name" id="method___construct">
  331. __construct()
  332. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  333. </h4>
  334. <aside class="phpdocumentor-element-found-in">
  335. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  336. :
  337. <span class="phpdocumentor-element-found-in__line">39</span>
  338. </aside>
  339. <code class="phpdocumentor-code phpdocumentor-signature ">
  340. <span class="phpdocumentor-signature__visibility">public</span>
  341. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$width</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">$height</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">mixed</span></code>
  342. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  343. <dl class="phpdocumentor-argument-list">
  344. <dt class="phpdocumentor-argument-list__entry">
  345. <span class="phpdocumentor-signature__argument__name">$width</span>
  346. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  347. </dt>
  348. <dd class="phpdocumentor-argument-list__definition">
  349. <section class="phpdocumentor-description"></section>
  350. </dd>
  351. <dt class="phpdocumentor-argument-list__entry">
  352. <span class="phpdocumentor-signature__argument__name">$height</span>
  353. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  354. </dt>
  355. <dd class="phpdocumentor-argument-list__definition">
  356. <section class="phpdocumentor-description"></section>
  357. </dd>
  358. <dt class="phpdocumentor-argument-list__entry">
  359. <span class="phpdocumentor-signature__argument__name">$options</span>
  360. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  361. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  362. <dd class="phpdocumentor-argument-list__definition">
  363. <section class="phpdocumentor-description"></section>
  364. </dd>
  365. </dl>
  366. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  367. <span class="phpdocumentor-signature__response_type">mixed</span>
  368. &mdash;
  369. </article>
  370. <article
  371. class="phpdocumentor-element
  372. -method
  373. -public
  374. "
  375. >
  376. <h4 class="phpdocumentor-element__name" id="method_getHeight">
  377. getHeight()
  378. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getHeight" class="headerlink"><i class="fas fa-link"></i></a>
  379. </h4>
  380. <aside class="phpdocumentor-element-found-in">
  381. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  382. :
  383. <span class="phpdocumentor-element-found-in__line">58</span>
  384. </aside>
  385. <code class="phpdocumentor-code phpdocumentor-signature ">
  386. <span class="phpdocumentor-signature__visibility">public</span>
  387. <span class="phpdocumentor-signature__name">getHeight</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  388. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  389. Tags
  390. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  391. </h5>
  392. <dl class="phpdocumentor-tag-list">
  393. <dt class="phpdocumentor-tag-list__entry">
  394. <span class="phpdocumentor-tag__name">inheritDoc</span>
  395. </dt>
  396. <dd class="phpdocumentor-tag-list__definition">
  397. </dd>
  398. </dl>
  399. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  400. <span class="phpdocumentor-signature__response_type">int</span>
  401. &mdash;
  402. <section class="phpdocumentor-description"><p>The height of the bitmap.</p>
  403. </section>
  404. </article>
  405. <article
  406. class="phpdocumentor-element
  407. -method
  408. -public
  409. "
  410. >
  411. <h4 class="phpdocumentor-element__name" id="method_getLuminances">
  412. getLuminances()
  413. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getLuminances" class="headerlink"><i class="fas fa-link"></i></a>
  414. </h4>
  415. <aside class="phpdocumentor-element-found-in">
  416. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  417. :
  418. <span class="phpdocumentor-element-found-in__line">48</span>
  419. </aside>
  420. <p class="phpdocumentor-summary">Fetches luminance data for the underlying bitmap. Values should be fetched using:
  421. `int luminance = array[y * width + x] &amp; 0xff`</p>
  422. <code class="phpdocumentor-code phpdocumentor-signature ">
  423. <span class="phpdocumentor-signature__visibility">public</span>
  424. <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>
  425. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  426. Tags
  427. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  428. </h5>
  429. <dl class="phpdocumentor-tag-list">
  430. <dt class="phpdocumentor-tag-list__entry">
  431. <span class="phpdocumentor-tag__name">inheritDoc</span>
  432. </dt>
  433. <dd class="phpdocumentor-tag-list__definition">
  434. </dd>
  435. </dl>
  436. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  437. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  438. &mdash;
  439. <section class="phpdocumentor-description"><p>A row-major 2D array of luminance values. Do not use result.length as it may be
  440. larger than width * height bytes on some platforms. Do not modify the contents
  441. of the result.</p>
  442. </section>
  443. </article>
  444. <article
  445. class="phpdocumentor-element
  446. -method
  447. -public
  448. "
  449. >
  450. <h4 class="phpdocumentor-element__name" id="method_getRow">
  451. getRow()
  452. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getRow" class="headerlink"><i class="fas fa-link"></i></a>
  453. </h4>
  454. <aside class="phpdocumentor-element-found-in">
  455. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  456. :
  457. <span class="phpdocumentor-element-found-in__line">63</span>
  458. </aside>
  459. <p class="phpdocumentor-summary">Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  460. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  461. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  462. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  463. getLuminances() may never be called.</p>
  464. <code class="phpdocumentor-code phpdocumentor-signature ">
  465. <span class="phpdocumentor-signature__visibility">public</span>
  466. <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>
  467. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  468. <dl class="phpdocumentor-argument-list">
  469. <dt class="phpdocumentor-argument-list__entry">
  470. <span class="phpdocumentor-signature__argument__name">$y</span>
  471. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  472. </dt>
  473. <dd class="phpdocumentor-argument-list__definition">
  474. <section class="phpdocumentor-description"><p>The row to fetch, which must be in [0,getHeight())</p>
  475. </section>
  476. </dd>
  477. </dl>
  478. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  479. Tags
  480. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  481. </h5>
  482. <dl class="phpdocumentor-tag-list">
  483. <dt class="phpdocumentor-tag-list__entry">
  484. <span class="phpdocumentor-tag__name">inheritDoc</span>
  485. </dt>
  486. <dd class="phpdocumentor-tag-list__definition">
  487. </dd>
  488. </dl>
  489. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  490. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  491. &mdash;
  492. <section class="phpdocumentor-description"><p>An array containing the luminance data.</p>
  493. </section>
  494. </article>
  495. <article
  496. class="phpdocumentor-element
  497. -method
  498. -public
  499. "
  500. >
  501. <h4 class="phpdocumentor-element__name" id="method_getWidth">
  502. getWidth()
  503. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getWidth" class="headerlink"><i class="fas fa-link"></i></a>
  504. </h4>
  505. <aside class="phpdocumentor-element-found-in">
  506. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  507. :
  508. <span class="phpdocumentor-element-found-in__line">53</span>
  509. </aside>
  510. <code class="phpdocumentor-code phpdocumentor-signature ">
  511. <span class="phpdocumentor-signature__visibility">public</span>
  512. <span class="phpdocumentor-signature__name">getWidth</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  513. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  514. Tags
  515. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  516. </h5>
  517. <dl class="phpdocumentor-tag-list">
  518. <dt class="phpdocumentor-tag-list__entry">
  519. <span class="phpdocumentor-tag__name">inheritDoc</span>
  520. </dt>
  521. <dd class="phpdocumentor-tag-list__definition">
  522. </dd>
  523. </dl>
  524. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  525. <span class="phpdocumentor-signature__response_type">int</span>
  526. &mdash;
  527. <section class="phpdocumentor-description"><p>The width of the bitmap.</p>
  528. </section>
  529. </article>
  530. <article
  531. class="phpdocumentor-element
  532. -method
  533. -protected
  534. -static "
  535. >
  536. <h4 class="phpdocumentor-element__name" id="method_checkFile">
  537. checkFile()
  538. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_checkFile" class="headerlink"><i class="fas fa-link"></i></a>
  539. </h4>
  540. <aside class="phpdocumentor-element-found-in">
  541. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  542. :
  543. <span class="phpdocumentor-element-found-in__line">90</span>
  544. </aside>
  545. <code class="phpdocumentor-code phpdocumentor-signature ">
  546. <span class="phpdocumentor-signature__visibility">protected</span>
  547. <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>
  548. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  549. <dl class="phpdocumentor-argument-list">
  550. <dt class="phpdocumentor-argument-list__entry">
  551. <span class="phpdocumentor-signature__argument__name">$path</span>
  552. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  553. </dt>
  554. <dd class="phpdocumentor-argument-list__definition">
  555. <section class="phpdocumentor-description"></section>
  556. </dd>
  557. </dl>
  558. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  559. Tags
  560. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  561. </h5>
  562. <dl class="phpdocumentor-tag-list">
  563. <dt class="phpdocumentor-tag-list__entry">
  564. <span class="phpdocumentor-tag__name">throws</span>
  565. </dt>
  566. <dd class="phpdocumentor-tag-list__definition">
  567. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  568. </dd>
  569. </dl>
  570. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  571. <span class="phpdocumentor-signature__response_type">string</span>
  572. &mdash;
  573. </article>
  574. <article
  575. class="phpdocumentor-element
  576. -method
  577. -protected
  578. "
  579. >
  580. <h4 class="phpdocumentor-element__name" id="method_setLuminancePixel">
  581. setLuminancePixel()
  582. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_setLuminancePixel" class="headerlink"><i class="fas fa-link"></i></a>
  583. </h4>
  584. <aside class="phpdocumentor-element-found-in">
  585. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  586. :
  587. <span class="phpdocumentor-element-found-in__line">79</span>
  588. </aside>
  589. <code class="phpdocumentor-code phpdocumentor-signature ">
  590. <span class="phpdocumentor-signature__visibility">protected</span>
  591. <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>
  592. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  593. <dl class="phpdocumentor-argument-list">
  594. <dt class="phpdocumentor-argument-list__entry">
  595. <span class="phpdocumentor-signature__argument__name">$r</span>
  596. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  597. </dt>
  598. <dd class="phpdocumentor-argument-list__definition">
  599. <section class="phpdocumentor-description"></section>
  600. </dd>
  601. <dt class="phpdocumentor-argument-list__entry">
  602. <span class="phpdocumentor-signature__argument__name">$g</span>
  603. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  604. </dt>
  605. <dd class="phpdocumentor-argument-list__definition">
  606. <section class="phpdocumentor-description"></section>
  607. </dd>
  608. <dt class="phpdocumentor-argument-list__entry">
  609. <span class="phpdocumentor-signature__argument__name">$b</span>
  610. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  611. </dt>
  612. <dd class="phpdocumentor-argument-list__definition">
  613. <section class="phpdocumentor-description"></section>
  614. </dd>
  615. </dl>
  616. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  617. <span class="phpdocumentor-signature__response_type">void</span>
  618. &mdash;
  619. </article>
  620. </section>
  621. <script type="text/javascript">
  622. function loadExternalCodeSnippets(line) {
  623. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  624. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  625. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  626. var language = 'php';
  627. var code = document.createElement('code');
  628. code.className = 'language-' + language;
  629. pre.textContent = '';
  630. pre.setAttribute('data-line', line)
  631. code.textContent = 'Loading…';
  632. pre.appendChild(code);
  633. var xhr = new XMLHttpRequest();
  634. xhr.open('GET', src, true);
  635. xhr.onreadystatechange = function () {
  636. if (xhr.readyState == 4) {
  637. if (xhr.status < 400 && xhr.responseText) {
  638. code.textContent = xhr.responseText;
  639. Prism.highlightElement(code);
  640. }
  641. else if (xhr.status >= 400) {
  642. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  643. }
  644. else {
  645. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  646. }
  647. }
  648. };
  649. xhr.send(null);
  650. });
  651. }
  652. var modals = document.querySelectorAll("[data-modal]");
  653. modals.forEach(function (trigger) {
  654. trigger.addEventListener("click", function (event) {
  655. //event.preventDefault();
  656. const modal = document.getElementById(trigger.dataset.modal);
  657. modal.classList.add("phpdocumentor-modal__open");
  658. loadExternalCodeSnippets(trigger.dataset.line)
  659. const exits = modal.querySelectorAll("[data-exit-button]");
  660. exits.forEach(function (exit) {
  661. exit.addEventListener("click", function (event) {
  662. event.preventDefault();
  663. modal.classList.remove("phpdocumentor-modal__open");
  664. });
  665. });
  666. });
  667. });
  668. </script>
  669. </article>
  670. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  671. <section class="phpdocumentor-search-results__dialog">
  672. <header class="phpdocumentor-search-results__header">
  673. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  674. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  675. </header>
  676. <section class="phpdocumentor-search-results__body">
  677. <ul class="phpdocumentor-search-results__entries"></ul>
  678. </section>
  679. </section>
  680. </section>
  681. </div>
  682. </div>
  683. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  684. </main>
  685. <script>
  686. cssVars({});
  687. </script>
  688. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  689. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  690. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  691. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  692. </body>
  693. </html>