ImageData: width プロパティ

読み取り専用プロパティ ImageData.width は、ImageData オブジェクトの 1 行あたりのピクセル数を返します。

数値です。

この例では、幅 200 ピクセル、高さ 100 ピクセルの ImageData オブジェクトを生成します。したがって、width プロパティは 200 です。

js
let imageData = new ImageData(200, 100);
console.log(imageData.width); // 200

仕様書

Specification
HTML Standard
# dom-imagedata-width-dev

ブラウザーの互換性

BCD tables only load in the browser

関連情報