<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>182424</bug_id>
          
          <creation_ts>2018-02-02 02:03:16 -0800</creation_ts>
          <short_desc>Complete ImageBitmap implementation</short_desc>
          <delta_ts>2023-10-30 05:38:41 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Canvas</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>149990</dependson>
    
    <dependson>182335</dependson>
    
    <dependson>182388</dependson>
    
    <dependson>183131</dependson>
    
    <dependson>183247</dependson>
    
    <dependson>183438</dependson>
    
    <dependson>183439</dependson>
    
    <dependson>183440</dependson>
    
    <dependson>184449</dependson>
    
    <dependson>211484</dependson>
    
    <dependson>227140</dependson>
    
    <dependson>237082</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ms2ger (he/him; ⌚ UTC+1/+2)">Ms2ger</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashley</cc>
    
    <cc>daytonlowell</cc>
    
    <cc>dcasorran</cc>
    
    <cc>dino</cc>
    
    <cc>ik</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>oconnorct1</cc>
    
    <cc>ranbuch</cc>
    
    <cc>tomac</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1395783</commentid>
    <comment_count>0</comment_count>
    <who name="Ms2ger (he/him; ⌚ UTC+1/+2)">Ms2ger</who>
    <bug_when>2018-02-02 02:03:16 -0800</bug_when>
    <thetext>At the very least:

* Cannot create ImageBitmap with a negative width or height
  -&gt; should be a minor fix
* createImageBitmap with HTMLVideoElement is not implemented
  -&gt; bug 182388
* createImageBitmap with OffscreenCanvas is not implemented
  -&gt; should be a minor fix; OffscreenCanvas::transferToImageBitmap() does something similar
* createImageBitmap with SVGImageElement is not implemented
* createImageBitmap with ImageData is not implemented
  -&gt; needs to integrate mime sniffing code somehow
* createImageBitmap with Blob is not implemented
  -&gt; needs to integrate mime sniffing code somehow</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1408090</commentid>
    <comment_count>1</comment_count>
    <who name="Dayton Lowell">daytonlowell</who>
    <bug_when>2018-03-21 10:52:37 -0700</bug_when>
    <thetext>spec: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-createimagebitmap</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1776643</commentid>
    <comment_count>2</comment_count>
    <who name="">ik</who>
    <bug_when>2021-07-13 09:22:19 -0700</bug_when>
    <thetext>+1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1827744</commentid>
    <comment_count>3</comment_count>
    <who name="Ashley Gullen">ashley</who>
    <bug_when>2022-01-03 08:26:08 -0800</bug_when>
    <thetext>Is the &quot;premultiplyAlpha&quot; option supported? It looks like WebGL gets unpremultiplied data when specifying that option,  it&apos;s hard to find up-to-date documentation, and it&apos;s difficult to feature detect the supported ImageBitmapOptions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1850990</commentid>
    <comment_count>4</comment_count>
    <who name="MrMartian">oconnorct1</who>
    <bug_when>2022-03-14 13:31:30 -0700</bug_when>
    <thetext>The image is still getting mutated a little when createImageBitmap is used in Safari. I store data in an RGBA encoded image, so any changes causes errors. It seems like the default setting is not entirely &quot;premultiply&quot;, nor is it &quot;none&quot;. For now, if browser detects it&apos;s safari, I have to use a polyfill to avoid image manipulation:

if (!(&apos;createImageBitmap&apos; in window) || isSafari) {
  window.createImageBitmap = async function (blob) {
    return new Promise((resolve, reject) =&gt; {
      const img = document.createElement(&apos;img&apos;)
      img.addEventListener(&apos;load&apos;, function () { resolve(this) })
      img.src = URL.createObjectURL(blob)
      img.deleteURL = function () { URL.revokeObjectURL(this.src) }
    })
  }
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958565</commentid>
    <comment_count>5</comment_count>
    <who name="Ran Buchnik">ranbuch</who>
    <bug_when>2023-05-28 22:43:42 -0700</bug_when>
    <thetext>+1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987929</commentid>
    <comment_count>6</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2023-10-27 00:45:23 -0700</bug_when>
    <thetext>Thank you for the reports.

ashley@scirra.com: would you have a reproduction testcase for your problem?

oconnorct1@gmail.com: would you have a reproduction for your problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987957</commentid>
    <comment_count>7</comment_count>
    <who name="Ashley Gullen">ashley</who>
    <bug_when>2023-10-27 04:34:54 -0700</bug_when>
    <thetext>It&apos;s been so long it&apos;s difficult to remember what the original situation was. But I think I filed issue 237082 in the end, which was fixed eventually.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987958</commentid>
    <comment_count>8</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2023-10-27 04:42:30 -0700</bug_when>
    <thetext>Thank you, seems probable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988459</commentid>
    <comment_count>9</comment_count>
    <who name="MrMartian">oconnorct1</who>
    <bug_when>2023-10-30 04:56:17 -0700</bug_when>
    <thetext>Sorry for the delay.
I checked ticket 237082 with the example and it was identical to my problem. Seems it is resolved now. Thanks for your effort!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988469</commentid>
    <comment_count>10</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2023-10-30 05:38:41 -0700</bug_when>
    <thetext>Seems fixed in the bugs listed in depends on section.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>