From 0b88bf3d79e44382ae264664b15e5b12893b025c Mon Sep 17 00:00:00 2001 From: Justin Novosad Date: Tue, 22 Mar 2016 13:15:47 -0400 Subject: [PATCH] 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 #923. PR: https://github.com/whatwg/html/pull/921 --- source | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source b/source index 43656c70b52..a1946a88de5 100644 --- a/source +++ b/source @@ -90443,9 +90443,10 @@ interface ImageBitmapFactories { by the Blob object's type attribute) giving the official type.

-
  • If the image data is not in a supported file format (e.g. it's not actually an image at - all), or if the image data is corrupted in some fatal way such that the image dimensions cannot - be obtained, then reject the promise with null, and abort these steps.

  • +
  • If the image data is not in a supported bitmap image file format (e.g. it's a vector + graphic or it's not an image at all), or if the image data is corrupted in some fatal way such + that the image dimensions cannot be obtained, then reject the promise with null, and abort + these steps.

  • Create a new ImageBitmap object.