Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b88bf3

Browse files
junovdomenic
authored andcommitted
Clarify that createImageBitmap fails with an SVG blob
This change makes it explicit that creating an ImageBitmap from a Blob only supports *bitmap* file formats. This behaviour is consistent with creating an ImageBitmap from an img element, which explicitly does not support vector graphics. Note: Supporting vector graphics would require defining a sizing algorithm to determine the scale of image, or to have an alternate API that has additional size parameters. See feature request in whatwg#923. PR: whatwg#921
1 parent 438155d commit 0b88bf3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source

+4-3
Original file line numberDiff line numberDiff line change
@@ -90443,9 +90443,10 @@ interface <dfn>ImageBitmapFactories</dfn> {
9044390443
by the <code>Blob</code> object's <code data-x="dom-Blob-type">type</code> attribute) giving the
9044490444
official type.</p></li>
9044590445

90446-
<li><p>If the image data is not in a supported file format (e.g. it's not actually an image at
90447-
all), or if the image data is corrupted in some fatal way such that the image dimensions cannot
90448-
be obtained, then reject the promise with null, and abort these steps.</p></li>
90446+
<li><p>If the image data is not in a supported bitmap image file format (e.g. it's a vector
90447+
graphic or it's not an image at all), or if the image data is corrupted in some fatal way such
90448+
that the image dimensions cannot be obtained, then reject the promise with null, and abort
90449+
these steps.</p></li>
9044990450

9045090451
<li><p>Create a new <code>ImageBitmap</code> object.</p></li>
9045190452

0 commit comments

Comments
 (0)