A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/ImageData/width below:

ImageData: width property - Web APIs

MDN Web Docs
  1. Web
  2. Web APIs
  3. ImageData
  4. width

Filter sidebar

In this article
  1. Canvas API
  2. ImageData
  3. Constructor
    1. ImageData()
  4. Instance properties
    1. colorSpace
    2. data
    3. height
    4. pixelFormat Experimental
    5. width
  5. Related pages for Canvas API
    1. CanvasGradient
    2. CanvasPattern
    3. CanvasRenderingContext2D
    4. HTMLCanvasElement
    5. ImageBitmap
    6. ImageBitmapRenderingContext
    7. OffscreenCanvas
    8. OffscreenCanvasRenderingContext2D
    9. Path2D
    10. TextMetrics
    11. Window.createImageBitmap()
    12. WorkerGlobalScope.createImageBitmap()
  6. Guides
    1. Manipulating video using canvas
  7. Tutorial
    1. Canvas tutorial
    2. Basic usage of canvas
    3. Drawing shapes with canvas
    4. Applying styles and colors
    5. Drawing text
    6. Using images
    7. Transformations
    8. Compositing and clipping
    9. Basic animations
    10. Advanced animations
    11. Pixel manipulation with canvas
    12. Optimizing canvas
    13. Finale
In this article ImageData: width property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Note: This feature is available in Web Workers.

The readonly ImageData.width property returns the number of pixels per row in the ImageData object.

Value

A number.

Examples

This example creates an ImageData object that is 200 pixels wide and 100 pixels tall. Thus, the width property is 200.

js

let imageData = new ImageData(200, 100);
console.log(imageData.width); // 200
Specifications Specification HTML
# dom-imagedata-width
Browser compatibility See also Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on Apr 22, 2024 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4