ImageData: width-Eigenschaft
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.
Hinweis: Diese Funktion ist in Web Workers verfügbar.
Die readonly ImageData.width
-Eigenschaft gibt die Anzahl der Pixel pro Reihe im ImageData
-Objekt zurück.
Wert
Eine Zahl.
Beispiele
Dieses Beispiel erzeugt ein ImageData
-Objekt, das 200 Pixel breit und 100 Pixel hoch ist. Daher ist die width
-Eigenschaft 200
.
js
let imageData = new ImageData(200, 100);
console.log(imageData.width); // 200
Spezifikationen
Specification |
---|
HTML # dom-imagedata-width-dev |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
width |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.