red29rabbit
Posts: 1
Joined: Wed Jun 07, 2017 3:23 am

image viewer (pyhton)

Wed Jun 07, 2017 3:29 am

Dear All,

is there a way to open up a image after the pi camera had taken a photo by using the default pi image viewer using python code?

currently i using PIL library and XV viewer.

Thank you

User avatar
paddyg
Posts: 2017
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: image viewer (pyhton)

Wed Jun 07, 2017 8:50 pm

on unix generally

Code: Select all

from PIL import Image
im = Image.open('picfile.png')
im.show()
will use xv if it's installed. You can (in theory) pass a command argument to show but I haven't managed to get it to work with gpicview. You can also make image viewing things with tkinter, PyQt etc (my specific knowledge is pi3d which does the job using GPU)
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

grahamnt
Posts: 2
Joined: Thu Aug 10, 2017 10:07 am

Re: image viewer (pyhton)

Thu Aug 10, 2017 10:17 am

red29rabbit wrote:
Wed Jun 07, 2017 3:29 am
Dear All,

is there a way to open up a image after the pi camera had taken a photo by using the default pi image viewer using python code?

currently i using PIL library and XV viewer.

Thank you
I'm not sure about it , but for the photo viewing that can support many image format , I use this PhotoViewerPro program .

Return to “Python”

Who is online

Users browsing this forum: No registered users and 15 guests