(p5image).height

def setup
  img = loadImage("fruit.png")
  image(img, 0, 0)
  for i in (0...img.height) do
    c = img.get(img.width / 2, i)
    stroke(c)
    line(0, i, width / 2, i)
  end
end

p5.jsリファレンス(参考情報)

[p5.js] (p5.Image.obj).height

概要

イメージの高さが格納されているプロパティです。

書式

obj.height

備考

関連

(p5image).width