chillerlan-QRCode-Decoder-GDLuminanceSource.html 46 KB

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