Py5Image.width

The width of the image in units of pixels.

Examples

example picture for width
1
2
3
4
def setup():
    tiles = py5.load_image("tiles.jpg")
    py5.image(tiles, 20, 10)
    py5.rect(55, 10, tiles.width, tiles.height)

Description

The width of the image in units of pixels.

Underlying Java field: PImage.width

Updated on September 11, 2021 16:51:34pm UTC