Timeline for Captured image file from PiCamera is 0kb, why?
Current License: CC BY-SA 3.0
2 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 24, 2017 at 17:16 | comment | added | Bab | I cpied the following code in my Cam0.py : / from time import sleep from picamera import PiCamera# Explicitly open a new file called my_image.jpg my_file = open('my_image.jpg', 'wb') camera = PiCamera() camera.start_preview() sleep(2) camera.capture(my_file) # At this point my_file.flush() has been called, but the file has # not yet been closed my_file.close() / after run the file is empty (Image file '/home/pi/Desktop/Babak/my_image.jpg' contains no data) !!! | |
Oct 23, 2017 at 15:23 | history | answered | Jacobm001 | CC BY-SA 3.0 |