ImageUtils.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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"><code>image</code></td>
  32. <td class="description last"><p>The image object.</p></td>
  33. </tr>
  34. <tr>
  35. <td class="name"><code>type</code></td>
  36. <td class="description last"><p>Indicates the image format.<br/>Default is <code>'image/png'</code>.</p></td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. <dl class="details">
  41. <dt class="tag-returns"><strong>Returns:</strong> The data URI.</dt>
  42. </dl>
  43. </div>
  44. <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>
  45. <div class="method">
  46. <div class="description">
  47. <p>Converts the given sRGB image data to linear color space.</p>
  48. </div>
  49. <table class="params">
  50. <tbody>
  51. <tr>
  52. <td class="name"><code>image</code></td>
  53. <td class="description last"><p>The image object.</p></td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. <dl class="details">
  58. <dt class="tag-returns"><strong>Returns:</strong> The converted image.</dt>
  59. </dl>
  60. </div>
  61. <h2 class="subsection-title">Source</h2>
  62. <p>
  63. <a href="https://github.com/mrdoob/three.js/blob/master/src/extras/ImageUtils.js" target="_blank" rel="noopener" translate="no">src/extras/ImageUtils.js</a>
  64. </p>
  65. </article>
  66. </section>
  67. <script src="../scripts/linenumber.js"></script>
  68. <script src="../scripts/page.js"></script>
  69. </body>
  70. </html>
粤ICP备19079148号