[Webkit-unassigned] [Bug 188347] Calling .decode() on Image instance referencing an SVG throws an EncodingError

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 6 09:38:28 PDT 2018


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

Said Abou-Hallawa <sabouhallawa at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Said Abou-Hallawa <sabouhallawa at apple.com> ---
According to the specs https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element, the description of the decode() method is the following:

image . decode()
This method causes the user agent to decode the image in parallel, returning a promise that fulfills when decoding is complete.

The promise will be rejected with an "EncodingError" DOMException if the image cannot be decoded.

Image encoding is the process of compressing the image pixels data into a specialized format for efficient transmission or storage.  Image decoding is the opposite process -- the conversion of an encoded format back into the original pixels data format.

It is clear that The SVG image is not represented in pixels format and it is not saved in compressed format, unless it is a base-64 data URL. But the decoding of the base-64 data URL is different from the HTMLImageElement.deocde() and it is done implicitly as part of loading the SVG image sub-resource.

So I think there is no bug here.

-- 
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/20180806/d0fca2e1/attachment-0001.html>


More information about the webkit-unassigned mailing list