The readonly ImageData.width property returns the number of pixels per row in the ImageData object.
ImageData.width
external int get width;