ImageUtils.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ImageUtils - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">ImageUtils</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>A class containing utility functions for images.</p></div>
  16. </header>
  17. <article>
  18. <div class="container-overview">
  19. <div class="method">
  20. </div>
  21. </div>
  22. <h2 class="subsection-title">Static Methods</h2>
  23. <h3 class="name name-method" id=".getDataURL" translate="no">.<a href="#.getDataURL">getDataURL</a><span class="signature">( image : <span class="param-type">HTMLImageElement | HTMLCanvasElement</span>, type : <span class="param-type">string</span> )</span><span class="type-signature"> : string</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Returns a data URI containing a representation of the given image.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name">
  32. <strong>image</strong>
  33. </td>
  34. <td class="description last">
  35. <p>The image object.</p>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td class="name">
  40. <strong>type</strong>
  41. </td>
  42. <td class="description last">
  43. <p>Indicates the image format.</p>
  44. <p>Default is <code>'image/png'</code>.</p>
  45. </td>
  46. </tr>
  47. </tbody>
  48. </table>
  49. <dl class="details">
  50. <dt class="tag-returns"><strong>Returns:</strong> The data URI.</dt>
  51. </dl>
  52. </div>
  53. <h3 class="name name-method" id=".sRGBToLinear" translate="no">.<a href="#.sRGBToLinear">sRGBToLinear</a><span class="signature">( image : <span class="param-type">HTMLImageElement | HTMLCanvasElement | ImageBitmap | Object</span> )</span><span class="type-signature"> : HTMLCanvasElement | Object</span> </h3>
  54. <div class="method">
  55. <div class="description">
  56. <p>Converts the given sRGB image data to linear color space.</p>
  57. </div>
  58. <table class="params">
  59. <tbody>
  60. <tr>
  61. <td class="name">
  62. <strong>image</strong>
  63. </td>
  64. <td class="description last">
  65. <p>The image object.</p>
  66. </td>
  67. </tr>
  68. </tbody>
  69. </table>
  70. <dl class="details">
  71. <dt class="tag-returns"><strong>Returns:</strong> The converted image.</dt>
  72. </dl>
  73. </div>
  74. <h2 class="subsection-title">Source</h2>
  75. <p>
  76. <a href="https://github.com/mrdoob/three.js/blob/master/src/extras/ImageUtils.js" translate="no" target="_blank" rel="noopener">src/extras/ImageUtils.js</a>
  77. </p>
  78. </article>
  79. </section>
  80. <script src="../scripts/linenumber.js"></script>
  81. <script src="../scripts/page.js"></script>
  82. </body>
  83. </html>
粤ICP备19079148号