Re: Display of JPEG images from Python

2006-01-15 Thread David
Svien and Michel,

Thanks for your help.  Much appreciated.

David Lees
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Display of JPEG images from Python

2006-01-08 Thread py pan
I remember seeing somewhere saying that the wx.StaticBitmap is only for small image (64x64?), is that true?On 6 Jan 2006 07:01:24 -0800, 
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
You can f.i. use wxPython (www.wxPython.org). Here is a compact andugly, but (almost) minimal, example of a python script that shows animage file:import wxa = wx.PySimpleApp
()wximg = wx.Image('img.jpg',wx.BITMAP_TYPE_JPEG)wxbmp=wximg.ConvertToBitmap()f = wx.Frame(None, -1, Show JPEG demo)f.SetSize( wxbmp.GetSize() )wx.StaticBitmap(f,-1,wxbmp,(0,0))f.Show(True)
def callback(evt,a=a,f=f):# Closes the window upon any keypressf.Close()a.ExitMainLoop()wx.EVT_CHAR(f,callback)a.MainLoop()-svein--
http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Display of JPEG images from Python

2006-01-07 Thread svbrk
You can f.i. use wxPython (www.wxPython.org). Here is a compact and
ugly, but (almost) minimal, example of a python script that shows an
image file:

import wx
a = wx.PySimpleApp()
wximg = wx.Image('img.jpg',wx.BITMAP_TYPE_JPEG)
wxbmp=wximg.ConvertToBitmap()
f = wx.Frame(None, -1, Show JPEG demo)
f.SetSize( wxbmp.GetSize() )
wx.StaticBitmap(f,-1,wxbmp,(0,0))
f.Show(True)
def callback(evt,a=a,f=f):
# Closes the window upon any keypress
f.Close()
a.ExitMainLoop()
wx.EVT_CHAR(f,callback)
a.MainLoop()

-svein

-- 
http://mail.python.org/mailman/listinfo/python-list


Display of JPEG images from Python

2006-01-05 Thread David
I would like to display a JPEG image from Python on a Windows machine. 
I Googled 'python jpeg display' and have not found what I am looking 
for, which is code I can call directly and pass the image.  I see the 
PIL library lets me do all sorts of image manipulation, but is there a 
convenient way to display results?  I guess I could issue shell commands 
to a graphics display package such as IrfanView, but I thought there 
might be a cleaner method.

david lees
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Display of JPEG images from Python

2006-01-05 Thread M�ta-MCI
Hi!

Example:

import Image
Image.open('Titi.jpg').show()




@-salutations

Michel Claveau



-- 
http://mail.python.org/mailman/listinfo/python-list