Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 897709 of ImageBitmap

  • Revision slug: Web/API/ImageBitmap
  • Revision title: ImageBitmap
  • Revision id: 897709
  • Created:
  • Creator: adria
  • Is current revision? No
  • Comment

Revision Content

{{APIRef}}

The ImageBitmap interface represents an bitmap image which can be drawn to a {{HTMLElement("canvas")}} without undue latency. It can be created from a variety of source objects using the {{domxref("CreateImageData")}} factory method. ImageBitmap provides an asynchronous and resource efficient pathway to prepare textures for rendering in WebGL.

Properties

{{domxref("ImageBitmap.height")}} {{readonlyInline}}
Is an unsigned long representing the height, in CSS pixels, of the ImageData.
{{domxref("ImageBitmap.width")}} {{readonlyInline}}
Is an unsigned long representing the width, in CSS pixels, of the ImageData.

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', "webappapis.html#imagebitmap", "ImageBitmap")}} {{Spec2('HTML WHATWG')}}  

Browser compatibility

{{ CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

See also

  • {{domxref("CanvasRenderingContext2D.drawImage()")}}
  • {{domxref("WebGLRenderingContext.texImage2D()")}}

Revision Source

<div>{{APIRef}}</div>

<p>The <code><strong>ImageBitmap</strong></code> interface represents an bitmap image which can be drawn to a {{HTMLElement("canvas")}} without undue latency. It can be created from a variety of source objects using the {{domxref("CreateImageData")}} factory method. ImageBitmap provides an asynchronous and resource efficient pathway to prepare textures for rendering in WebGL.</p>

<h2 id="Properties">Properties</h2>

<dl>
 <dt>{{domxref("ImageBitmap.height")}} {{readonlyInline}}</dt>
 <dd>Is an <code>unsigned</code> <code>long</code> representing the height, in CSS pixels, of the <code>ImageData</code>.</dd>
 <dt>{{domxref("ImageBitmap.width")}} {{readonlyInline}}</dt>
 <dd>Is an <code>unsigned</code> <code>long</code> representing the width, in CSS pixels, of the <code>ImageData</code>.</dd>
</dl>

<h2 id="Specifications" name="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', "webappapis.html#imagebitmap", "ImageBitmap")}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{ CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{domxref("CanvasRenderingContext2D.drawImage()")}}</li>
 <li>{{domxref("WebGLRenderingContext.texImage2D()")}}</li>
</ul>
Revert to this revision