Drawing Images¶
- image(path, (x, y), alpha=1, pageNumber=None)¶
Add an image from a path with an offset and an alpha value. This accepts most common file types like pdf, jpg, png, tiff and gif. NSImage objects are accepted too.
Optionally an alpha can be provided, which is a value between 0 and 1.
Optionally a pageNumber can be provided when the path referes to a multi page pdf file.
# the path can be a path to a file or a url, image from https://www.wired.com/2012/08/a1-art-0-99-vending-machines-as-art-galleries/ image("https://raw.githubusercontent.com/typemytype/drawbot/master/tests/data/drawBot.jpg", (100, 100), alpha=.3)