Passing Images

Hi,

I would like to thank everyone for their advice, it now works fine. Also I switched to the media control rather than using images and the application is now much faster.

Kind regards,

rod

···

----- Original Message ----
From: Chris Mellon arkanes@gmail.com
To: wxPython-users@lists.wxwidgets.org
Sent: Tuesday, 4 September, 2007 5:20:59 PM
Subject: Re: [wxPython-users] Passing Images

On 9/4/07, Rod userprogoogle-139@yahoo.co.uk wrote:

Hi,

Sorry if this seems like a silly question. I am returning to wxPython after
a long
break!

I am in the process of writing a small application, or rather sets of
classes which I plan to use for grabbing webcam images. I am able to grab
the webcam image without any problem then from that create a TIFF image
which is subsequently saved to a file. However I also want this image to be
displayed in a window/frame. At present the program grabs the image again
from the saved file and displays this in a window. However I suspect this is
causing some serious slow down, especially after a few minutes for some
reason.

This is certainly slower, but isn’t likely to cause the symptom you’re
seeing, so I suggest looking longer.

However I have tried passing the TIFF object to the image in the
window using events and other means but I always get an error saying that
wx.Image expects a strong or unicode character. Is there a way to pass

TIFF’s or other formats directly without the need to go via file I/O? I am

using the standard wx.Image class to create and display images on a panel.

Assuming that your webcam library retrieves the TIFF object for you as
a Python string object:

img = wx.ImageFromStream(cStringIO.StringIO(tiffdata), wx.BITMAP_TYPE_TIF)


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org