vflip_hmirror_transpose.py
import csi
import time
import image
csi0 = csi.CSI()
csi0.reset()
csi0.pixformat(csi.RGB565)
csi0.framesize(csi.QVGA)
csi0.snapshot(time=2000)
clock = time.clock()
ticks = time.ticks_ms()
counter = 0
while True:
clock.tick()
vflip = image.VFLIP if (counter // 2) % 2 else 0
hmirror = image.HMIRROR if (counter // 4) % 2 else 0
transpose = image.TRANSPOSE if (counter // 8) % 2 else 0
img = csi0.snapshot().scale(hint=(vflip | hmirror | transpose))
if time.ticks_diff(time.ticks_ms(), ticks) > 1000:
ticks = time.ticks_ms()
counter += 1
print(clock.fps())