adafruit / Adafruit_CircuitPython_PyCamera

Library for the Adafruit PyCamera
https://docs.circuitpython.org/projects/pycamera
MIT License
17 stars 9 forks source link

horizontally flipped preview/image #7

Closed jedgarpark closed 11 months ago

jedgarpark commented 11 months ago

I'm seeing horizontally flipped/mirrored images in live preview and in saved images when using the examples/camera/code.py I tried setting pycam.hmirror = False but this didn't seem to make a difference.

jedgarpark commented 11 months ago

i was able to set the hmirror to False in the library itself to get a non-mirrored live view and stored photo by changing it to self.camera.hmirror = False so maybe this could be a choice in the constructor when we create the pycam object in code?

caternuson commented 11 months ago

I ran into same thing running the camera example.

It's possible to fix in user code with:

pycam.camera.hmirror = False

hmirror is a property of the camera object within the pycam instance, not pycam itself.

I just added it after the constructor like this:

pycam = adafruit_pycamera.PyCamera()
pycam.camera.hmirror = False
dhalbert commented 11 months ago

Maybe pycam.camera.hmirror = False should be the default?

caternuson commented 11 months ago

Yep. Agree. But don't know reasoning behind current default in library.