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 GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
width

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Siehe auch