ImageBitmapFactories

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!
您也可以阅读此文章的English (US)版。

Important: As of Firefox 52, the method defined in this mixin has been moved to the WindowOrWorkerGlobalScope mixin, and other browsers will follow suit. Look to that page for up-to-date details.

The ImageBitmapFactories mixin interface contains utility methods to create an ImageBitmap. There is no object of this type, but the two interfaces Window, available within the regular browsing scope, and the WorkerGlobalScope interface for workers, implement this interface.

Methods

ImageBitmapFactories.createImageBitmap()
Accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap. Optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh.

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'ImageBitmapFactories' in that specification.
Living Standard  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? 42 (42) ? ? ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? 42.0 (42) ? ? ?

See also

文档标签和贡献者