Page 1 of 1

How can I display an image file in Python script?

Posted: Tue Jul 01, 2014 3:49 am
by Cosworth431
Hi, I am writing a program that should display an image file that had been taken earlier using PiCam and raspistill command.
The image is stored in /home/pi and the file name is face.jpg. I want it to show up for a few seconds so user can view the image without clicking anything. The image viewer should close after the time set. Any idea how can I so this? Thanks.

Re: How can I display an image file in Python script?

Posted: Tue Jul 01, 2014 5:59 am
by riklaunim
Simple PyQT4/5 application could do that using QLabel to display it and QTimer to close after some time.

Re: How can I display an image file in Python script?

Posted: Tue Jul 01, 2014 6:58 am
by KenT
or Python Tkinter and PIL. All are installed in the RPi

Re: How can I display an image file in Python script?

Posted: Tue Jul 01, 2014 7:08 am
by DougieLawson
KenT wrote:or Python Tkinter and PIL. All are installed in the RPi
Assuming that you are using a full stock install of Raspbian.

Re: How can I display an image file in Python script?

Posted: Tue Jul 01, 2014 11:13 pm
by AndrewS
Side note: If you're using raspistill with python, maybe you'd be better served by http://picamera.readthedocs.org/ ?