To add a bit more detail, if I copy the suggested code from the imageObject page but add a path for the optional path
arg, I get an error message.
Error:
Traceback (most recent call last):
File "<untitled>", line 10, in <module>
File "drawBot/drawBotDrawingTools.pyc", line 265, in size
drawBot.misc.DrawBotError: Can't use 'size()' after drawing has begun. Try to move it to the top of your script.
Code:
size(550, 300)
# initiate a new image object
im = ImageObject("/Users/stephennixon/Downloads/stills/IMG_0769-still-0018.jpg")
# draw in the image
# the 'with' statement will create a custom context
# only drawing in the image object
with im:
# set a size for the image
size(200, 200)
# draw something
fill(1, 0, 0)
rect(0, 0, width(), height())
fill(1)
fontSize(30)
text("Hello World", (10, 10))
# draw in the image in the main context
image(im, (10, 50))
# apply some filters
im.gaussianBlur()
# get the offset (with a blur this will be negative)
x, y = im.offset()
# draw in the image in the main context
image(im, (300+x, 50+y))
Just to confirm that I am using the correct path, it works fine to use the following code (I just wish I could figure out how to adjust the size).
image("/Users/stephennixon/Downloads/stills/IMG_0769-still-0018.jpg", (10, 50))
Thanks so much for any insights!