chillerlan-QRCode-Decoder-IMagickLuminanceSource.html 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998
  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. IMagickLuminanceSource
  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/IMagickLuminanceSource.php"><a href="files/src-decoder-imagickluminancesource.html"><abbr title="src/Decoder/IMagickLuminanceSource.php">IMagickLuminanceSource.php</abbr></a></abbr>
  101. :
  102. <span class="phpdocumentor-element-found-in__line">23</span>
  103. </aside>
  104. <p class="phpdocumentor-summary">This class is used to help decode images from files which arrive as Imagick 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-IMagickLuminanceSource.html#property_imagick">$imagick</a>
  131. <span>
  132. &nbsp;: <abbr title="\Imagick">Imagick</abbr> </span>
  133. </dt>
  134. <dd></dd>
  135. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  136. <a href="classes/chillerlan-QRCode-Decoder-IMagickLuminanceSource.html#method___construct">__construct()</a>
  137. <span>
  138. &nbsp;: mixed </span>
  139. </dt>
  140. <dd>IMagickLuminanceSource constructor.</dd>
  141. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  142. <a href="classes/chillerlan-QRCode-Decoder-IMagickLuminanceSource.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-IMagickLuminanceSource.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. {@code 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-IMagickLuminanceSource.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-IMagickLuminanceSource.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">30</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">28</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">29</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_imagick">
  292. $imagick
  293. <a href="classes/chillerlan-QRCode-Decoder-IMagickLuminanceSource.html#property_imagick" 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/IMagickLuminanceSource.php"><a href="files/src-decoder-imagickluminancesource.html"><abbr title="src/Decoder/IMagickLuminanceSource.php">IMagickLuminanceSource.php</abbr></a></abbr>
  299. :
  300. <span class="phpdocumentor-element-found-in__line">25</span>
  301. </aside>
  302. <code class="phpdocumentor-code phpdocumentor-signature ">
  303. <span class="phpdocumentor-signature__visibility">private</span>
  304. <span class="phpdocumentor-signature__type"><abbr title="\Imagick">Imagick</abbr></span>
  305. <span class="phpdocumentor-signature__name">$imagick</span>
  306. </code>
  307. <section class="phpdocumentor-description"></section>
  308. <section class="phpdocumentor-description"></section>
  309. </article>
  310. </section>
  311. <section class="phpdocumentor-methods">
  312. <h3 class="phpdocumentor-elements__header" id="methods">
  313. Methods
  314. <a href="classes/chillerlan-QRCode-Decoder-IMagickLuminanceSource.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  315. </h3>
  316. <article
  317. class="phpdocumentor-element
  318. -method
  319. -public
  320. "
  321. >
  322. <h4 class="phpdocumentor-element__name" id="method___construct">
  323. __construct()
  324. <a href="classes/chillerlan-QRCode-Decoder-IMagickLuminanceSource.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  325. </h4>
  326. <aside class="phpdocumentor-element-found-in">
  327. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/IMagickLuminanceSource.php"><a href="files/src-decoder-imagickluminancesource.html"><abbr title="src/Decoder/IMagickLuminanceSource.php">IMagickLuminanceSource.php</abbr></a></abbr>
  328. :
  329. <span class="phpdocumentor-element-found-in__line">34</span>
  330. </aside>
  331. <p class="phpdocumentor-summary">IMagickLuminanceSource constructor.</p>
  332. <code class="phpdocumentor-code phpdocumentor-signature ">
  333. <span class="phpdocumentor-signature__visibility">public</span>
  334. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\Imagick">Imagick</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$imagick</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  335. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  336. <dl class="phpdocumentor-argument-list">
  337. <dt class="phpdocumentor-argument-list__entry">
  338. <span class="phpdocumentor-signature__argument__name">$imagick</span>
  339. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Imagick">Imagick</abbr></span>
  340. </dt>
  341. <dd class="phpdocumentor-argument-list__definition">
  342. </dd>
  343. </dl>
  344. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  345. Tags
  346. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  347. </h5>
  348. <dl class="phpdocumentor-tag-list">
  349. <dt class="phpdocumentor-tag-list__entry">
  350. <span class="phpdocumentor-tag__name">throws</span>
  351. </dt>
  352. <dd class="phpdocumentor-tag-list__definition">
  353. <span class="phpdocumentor-tag-link"><abbr title="\InvalidArgumentException">InvalidArgumentException</abbr></span>
  354. </dd>
  355. </dl>
  356. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  357. <span class="phpdocumentor-signature__response_type">mixed</span>
  358. &mdash;
  359. </article>
  360. <article
  361. class="phpdocumentor-element
  362. -method
  363. -public
  364. -static "
  365. >
  366. <h4 class="phpdocumentor-element__name" id="method_fromBlob">
  367. fromBlob()
  368. <a href="classes/chillerlan-QRCode-Decoder-IMagickLuminanceSource.html#method_fromBlob" class="headerlink"><i class="fas fa-link"></i></a>
  369. </h4>
  370. <aside class="phpdocumentor-element-found-in">
  371. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/IMagickLuminanceSource.php"><a href="files/src-decoder-imagickluminancesource.html"><abbr title="src/Decoder/IMagickLuminanceSource.php">IMagickLuminanceSource.php</abbr></a></abbr>
  372. :
  373. <span class="phpdocumentor-element-found-in__line">64</span>
  374. </aside>
  375. <code class="phpdocumentor-code phpdocumentor-signature ">
  376. <span class="phpdocumentor-signature__visibility">public</span>
  377. <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>
  378. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  379. <dl class="phpdocumentor-argument-list">
  380. <dt class="phpdocumentor-argument-list__entry">
  381. <span class="phpdocumentor-signature__argument__name">$blob</span>
  382. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  383. </dt>
  384. <dd class="phpdocumentor-argument-list__definition">
  385. <section class="phpdocumentor-description"></section>
  386. </dd>
  387. </dl>
  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">self</span>
  401. &mdash;
  402. </article>
  403. <article
  404. class="phpdocumentor-element
  405. -method
  406. -public
  407. -static "
  408. >
  409. <h4 class="phpdocumentor-element__name" id="method_fromFile">
  410. fromFile()
  411. <a href="classes/chillerlan-QRCode-Decoder-IMagickLuminanceSource.html#method_fromFile" class="headerlink"><i class="fas fa-link"></i></a>
  412. </h4>
  413. <aside class="phpdocumentor-element-found-in">
  414. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/IMagickLuminanceSource.php"><a href="files/src-decoder-imagickluminancesource.html"><abbr title="src/Decoder/IMagickLuminanceSource.php">IMagickLuminanceSource.php</abbr></a></abbr>
  415. :
  416. <span class="phpdocumentor-element-found-in__line">57</span>
  417. </aside>
  418. <code class="phpdocumentor-code phpdocumentor-signature ">
  419. <span class="phpdocumentor-signature__visibility">public</span>
  420. <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>
  421. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  422. <dl class="phpdocumentor-argument-list">
  423. <dt class="phpdocumentor-argument-list__entry">
  424. <span class="phpdocumentor-signature__argument__name">$path</span>
  425. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  426. </dt>
  427. <dd class="phpdocumentor-argument-list__definition">
  428. <section class="phpdocumentor-description"></section>
  429. </dd>
  430. </dl>
  431. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  432. Tags
  433. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  434. </h5>
  435. <dl class="phpdocumentor-tag-list">
  436. <dt class="phpdocumentor-tag-list__entry">
  437. <span class="phpdocumentor-tag__name">inheritDoc</span>
  438. </dt>
  439. <dd class="phpdocumentor-tag-list__definition">
  440. </dd>
  441. </dl>
  442. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  443. <span class="phpdocumentor-signature__response_type">self</span>
  444. &mdash;
  445. </article>
  446. <article
  447. class="phpdocumentor-element
  448. -method
  449. -public
  450. "
  451. >
  452. <h4 class="phpdocumentor-element__name" id="method_getHeight">
  453. getHeight()
  454. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getHeight" class="headerlink"><i class="fas fa-link"></i></a>
  455. </h4>
  456. <aside class="phpdocumentor-element-found-in">
  457. <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>
  458. :
  459. <span class="phpdocumentor-element-found-in__line">54</span>
  460. </aside>
  461. <code class="phpdocumentor-code phpdocumentor-signature ">
  462. <span class="phpdocumentor-signature__visibility">public</span>
  463. <span class="phpdocumentor-signature__name">getHeight</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  464. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  465. Tags
  466. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  467. </h5>
  468. <dl class="phpdocumentor-tag-list">
  469. <dt class="phpdocumentor-tag-list__entry">
  470. <span class="phpdocumentor-tag__name">inheritDoc</span>
  471. </dt>
  472. <dd class="phpdocumentor-tag-list__definition">
  473. </dd>
  474. </dl>
  475. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  476. <span class="phpdocumentor-signature__response_type">int</span>
  477. &mdash;
  478. <section class="phpdocumentor-description"><p>The height of the bitmap.</p>
  479. </section>
  480. </article>
  481. <article
  482. class="phpdocumentor-element
  483. -method
  484. -public
  485. "
  486. >
  487. <h4 class="phpdocumentor-element__name" id="method_getMatrix">
  488. getMatrix()
  489. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getMatrix" class="headerlink"><i class="fas fa-link"></i></a>
  490. </h4>
  491. <aside class="phpdocumentor-element-found-in">
  492. <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>
  493. :
  494. <span class="phpdocumentor-element-found-in__line">44</span>
  495. </aside>
  496. <p class="phpdocumentor-summary">Fetches luminance data for the underlying bitmap. Values should be fetched using:
  497. {@code int luminance = array[y * width + x] &amp; 0xff}</p>
  498. <code class="phpdocumentor-code phpdocumentor-signature ">
  499. <span class="phpdocumentor-signature__visibility">public</span>
  500. <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>
  501. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  502. Tags
  503. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  504. </h5>
  505. <dl class="phpdocumentor-tag-list">
  506. <dt class="phpdocumentor-tag-list__entry">
  507. <span class="phpdocumentor-tag__name">inheritDoc</span>
  508. </dt>
  509. <dd class="phpdocumentor-tag-list__definition">
  510. </dd>
  511. </dl>
  512. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  513. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  514. &mdash;
  515. <section class="phpdocumentor-description"><p>A row-major 2D array of luminance values. Do not use result.length as it may be
  516. larger than width * height bytes on some platforms. Do not modify the contents
  517. of the result.</p>
  518. </section>
  519. </article>
  520. <article
  521. class="phpdocumentor-element
  522. -method
  523. -public
  524. "
  525. >
  526. <h4 class="phpdocumentor-element__name" id="method_getRow">
  527. getRow()
  528. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getRow" class="headerlink"><i class="fas fa-link"></i></a>
  529. </h4>
  530. <aside class="phpdocumentor-element-found-in">
  531. <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>
  532. :
  533. <span class="phpdocumentor-element-found-in__line">59</span>
  534. </aside>
  535. <p class="phpdocumentor-summary">Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  536. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  537. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  538. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  539. getMatrix() may never be called.</p>
  540. <code class="phpdocumentor-code phpdocumentor-signature ">
  541. <span class="phpdocumentor-signature__visibility">public</span>
  542. <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>
  543. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  544. <dl class="phpdocumentor-argument-list">
  545. <dt class="phpdocumentor-argument-list__entry">
  546. <span class="phpdocumentor-signature__argument__name">$y</span>
  547. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  548. </dt>
  549. <dd class="phpdocumentor-argument-list__definition">
  550. <section class="phpdocumentor-description"><p>The row to fetch, which must be in [0,getHeight())</p>
  551. </section>
  552. </dd>
  553. </dl>
  554. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  555. Tags
  556. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  557. </h5>
  558. <dl class="phpdocumentor-tag-list">
  559. <dt class="phpdocumentor-tag-list__entry">
  560. <span class="phpdocumentor-tag__name">inheritDoc</span>
  561. </dt>
  562. <dd class="phpdocumentor-tag-list__definition">
  563. </dd>
  564. </dl>
  565. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  566. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  567. &mdash;
  568. <section class="phpdocumentor-description"><p>An array containing the luminance data.</p>
  569. </section>
  570. </article>
  571. <article
  572. class="phpdocumentor-element
  573. -method
  574. -public
  575. "
  576. >
  577. <h4 class="phpdocumentor-element__name" id="method_getWidth">
  578. getWidth()
  579. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getWidth" class="headerlink"><i class="fas fa-link"></i></a>
  580. </h4>
  581. <aside class="phpdocumentor-element-found-in">
  582. <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>
  583. :
  584. <span class="phpdocumentor-element-found-in__line">49</span>
  585. </aside>
  586. <code class="phpdocumentor-code phpdocumentor-signature ">
  587. <span class="phpdocumentor-signature__visibility">public</span>
  588. <span class="phpdocumentor-signature__name">getWidth</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  589. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  590. Tags
  591. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  592. </h5>
  593. <dl class="phpdocumentor-tag-list">
  594. <dt class="phpdocumentor-tag-list__entry">
  595. <span class="phpdocumentor-tag__name">inheritDoc</span>
  596. </dt>
  597. <dd class="phpdocumentor-tag-list__definition">
  598. </dd>
  599. </dl>
  600. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  601. <span class="phpdocumentor-signature__response_type">int</span>
  602. &mdash;
  603. <section class="phpdocumentor-description"><p>The width of the bitmap.</p>
  604. </section>
  605. </article>
  606. <article
  607. class="phpdocumentor-element
  608. -method
  609. -protected
  610. -static "
  611. >
  612. <h4 class="phpdocumentor-element__name" id="method_checkFile">
  613. checkFile()
  614. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_checkFile" class="headerlink"><i class="fas fa-link"></i></a>
  615. </h4>
  616. <aside class="phpdocumentor-element-found-in">
  617. <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>
  618. :
  619. <span class="phpdocumentor-element-found-in__line">86</span>
  620. </aside>
  621. <code class="phpdocumentor-code phpdocumentor-signature ">
  622. <span class="phpdocumentor-signature__visibility">protected</span>
  623. <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>
  624. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  625. <dl class="phpdocumentor-argument-list">
  626. <dt class="phpdocumentor-argument-list__entry">
  627. <span class="phpdocumentor-signature__argument__name">$path</span>
  628. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  629. </dt>
  630. <dd class="phpdocumentor-argument-list__definition">
  631. <section class="phpdocumentor-description"></section>
  632. </dd>
  633. </dl>
  634. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  635. <span class="phpdocumentor-signature__response_type">string</span>
  636. &mdash;
  637. </article>
  638. <article
  639. class="phpdocumentor-element
  640. -method
  641. -protected
  642. "
  643. >
  644. <h4 class="phpdocumentor-element__name" id="method_setLuminancePixel">
  645. setLuminancePixel()
  646. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_setLuminancePixel" class="headerlink"><i class="fas fa-link"></i></a>
  647. </h4>
  648. <aside class="phpdocumentor-element-found-in">
  649. <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>
  650. :
  651. <span class="phpdocumentor-element-found-in__line">75</span>
  652. </aside>
  653. <code class="phpdocumentor-code phpdocumentor-signature ">
  654. <span class="phpdocumentor-signature__visibility">protected</span>
  655. <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>
  656. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  657. <dl class="phpdocumentor-argument-list">
  658. <dt class="phpdocumentor-argument-list__entry">
  659. <span class="phpdocumentor-signature__argument__name">$r</span>
  660. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  661. </dt>
  662. <dd class="phpdocumentor-argument-list__definition">
  663. <section class="phpdocumentor-description"></section>
  664. </dd>
  665. <dt class="phpdocumentor-argument-list__entry">
  666. <span class="phpdocumentor-signature__argument__name">$g</span>
  667. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  668. </dt>
  669. <dd class="phpdocumentor-argument-list__definition">
  670. <section class="phpdocumentor-description"></section>
  671. </dd>
  672. <dt class="phpdocumentor-argument-list__entry">
  673. <span class="phpdocumentor-signature__argument__name">$b</span>
  674. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  675. </dt>
  676. <dd class="phpdocumentor-argument-list__definition">
  677. <section class="phpdocumentor-description"></section>
  678. </dd>
  679. </dl>
  680. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  681. <span class="phpdocumentor-signature__response_type">void</span>
  682. &mdash;
  683. </article>
  684. <article
  685. class="phpdocumentor-element
  686. -method
  687. -private
  688. "
  689. >
  690. <h4 class="phpdocumentor-element__name" id="method_setLuminancePixels">
  691. setLuminancePixels()
  692. <a href="classes/chillerlan-QRCode-Decoder-IMagickLuminanceSource.html#method_setLuminancePixels" class="headerlink"><i class="fas fa-link"></i></a>
  693. </h4>
  694. <aside class="phpdocumentor-element-found-in">
  695. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/IMagickLuminanceSource.php"><a href="files/src-decoder-imagickluminancesource.html"><abbr title="src/Decoder/IMagickLuminanceSource.php">IMagickLuminanceSource.php</abbr></a></abbr>
  696. :
  697. <span class="phpdocumentor-element-found-in__line">45</span>
  698. </aside>
  699. <code class="phpdocumentor-code phpdocumentor-signature ">
  700. <span class="phpdocumentor-signature__visibility">private</span>
  701. <span class="phpdocumentor-signature__name">setLuminancePixels</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  702. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  703. <span class="phpdocumentor-signature__response_type">void</span>
  704. &mdash;
  705. </article>
  706. </section>
  707. <script type="text/javascript">
  708. function loadExternalCodeSnippets(line) {
  709. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  710. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  711. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  712. var language = 'php';
  713. var code = document.createElement('code');
  714. code.className = 'language-' + language;
  715. pre.textContent = '';
  716. pre.setAttribute('data-line', line)
  717. code.textContent = 'Loading…';
  718. pre.appendChild(code);
  719. var xhr = new XMLHttpRequest();
  720. xhr.open('GET', src, true);
  721. xhr.onreadystatechange = function () {
  722. if (xhr.readyState == 4) {
  723. if (xhr.status < 400 && xhr.responseText) {
  724. code.textContent = xhr.responseText;
  725. Prism.highlightElement(code);
  726. }
  727. else if (xhr.status >= 400) {
  728. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  729. }
  730. else {
  731. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  732. }
  733. }
  734. };
  735. xhr.send(null);
  736. });
  737. }
  738. var modals = document.querySelectorAll("[data-modal]");
  739. modals.forEach(function (trigger) {
  740. trigger.addEventListener("click", function (event) {
  741. //event.preventDefault();
  742. const modal = document.getElementById(trigger.dataset.modal);
  743. modal.classList.add("phpdocumentor-modal__open");
  744. loadExternalCodeSnippets(trigger.dataset.line)
  745. const exits = modal.querySelectorAll("[data-exit-button]");
  746. exits.forEach(function (exit) {
  747. exit.addEventListener("click", function (event) {
  748. event.preventDefault();
  749. modal.classList.remove("phpdocumentor-modal__open");
  750. });
  751. });
  752. });
  753. });
  754. </script>
  755. </article>
  756. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  757. <section class="phpdocumentor-search-results__dialog">
  758. <header class="phpdocumentor-search-results__header">
  759. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  760. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  761. </header>
  762. <section class="phpdocumentor-search-results__body">
  763. <ul class="phpdocumentor-search-results__entries"></ul>
  764. </section>
  765. </section>
  766. </section>
  767. </div>
  768. </div>
  769. <a href="classes/chillerlan-QRCode-Decoder-IMagickLuminanceSource.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  770. </main>
  771. <script>
  772. cssVars({});
  773. </script>
  774. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  775. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  776. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  777. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  778. </body>
  779. </html>