Example: 02-Image-Processing/00-Drawing/image_drawing.py
import sensor
import time
import image
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time=2000)
clock = time.clock()
while True:
clock.tick()
img = sensor.snapshot()
small_img = img.scale(x_scale=0.25, y_scale=0.25, hint=image.AREA, copy=True)
x = (img.width() // 2) - (small_img.width() // 2)
y = (img.height() // 2) - (small_img.height() // 2)
img.draw_image(small_img, x, y, x_scale=1, y_scale=1)
print(clock.fps())