[Webkit-unassigned] [Bug 182424] Complete ImageBitmap implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 14 13:31:30 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=182424

MrMartian <oconnorct1 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oconnorct1 at gmail.com

--- Comment #4 from MrMartian <oconnorct1 at gmail.com> ---
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 "premultiply", nor is it "none". For now, if browser detects it's safari, I have to use a polyfill to avoid image manipulation:

if (!('createImageBitmap' in window) || isSafari) {
  window.createImageBitmap = async function (blob) {
    return new Promise((resolve, reject) => {
      const img = document.createElement('img')
      img.addEventListener('load', function () { resolve(this) })
      img.src = URL.createObjectURL(blob)
      img.deleteURL = function () { URL.revokeObjectURL(this.src) }
    })
  }
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220314/21083870/attachment.htm>


More information about the webkit-unassigned mailing list