Hello,
I am trying to rotate an image read from an ImageIO stream by 270° (perform hmirror and transpose).
I read from the docs that image.replace is used for this.
So I tried this:
import image
import time
stream = image.ImageIO("video5.bin", "r")
clock = time.clock()
while True:
clock.tick()
img = stream.read(copy_to_fb=True, loop=True, pause=True)
img.replace(hmirror=True, transpose=True)
print(clock.fps())
which throws this error:
TypeError: ‘image’ argument required
Then tried this:
import image
import time
stream = image.ImageIO("video5.bin", "r")
clock = time.clock()
while True:
clock.tick()
img = stream.read(copy_to_fb=True, loop=True, pause=True)
img.replace(True, False, True)
print(clock.fps())
This does not throw an error, but the image I receive is black.
Best regards