Image Properties


Return the width and height of an image.

imagePixelColor(path, (x, y))

Return the color r, g, b, a of an image at a specified x, y possition.

# path to the image
path = u""

# get the size of the image
w, h = imageSize(path)

# setup a variable for the font size as for the steps
s = 15

# shift it up a bit
translate(100, 100)

# set a font with a size

# loop over the width of the image
for x in range(0, w, s):
    # loop of the height of the image
    for y in range(0, h, s):
        # get the color
        color = imagePixelColor(path, (x, y))
        if color:
            r, g, b, a = color
            # set the color
            fill(r, g, b, a)
            # draw some text
            text("W", (x, y))

Return the image resolution for a given image.


Return the number of pages for a given pdf or (animated) gif.