[libavg-users] Adding images inside a frame handler
Alex Harrington
alex at longhill.org.uk
Wed Jan 6 12:22:47 CET 2010
> There's a bitmap constructor that takes a point, a pixel format and a
> string, in that order.
Sorry. I'm probably being dense but here's what I have now:
image = Image.open(os.path.join('data',self.options['uri']))
image.thumbnail((self.width,self.height),Image.ANTIALIAS)
point = avg.Point2D(0,0)
bitmap = avg.Bitmap(point,"B5G6R5",image.tostring())
self.p.enqueue('setBitmap',(self.mediaNodeName, bitmap))
I'm really not sure what pixel format I should be putting in? PIL just says it's in RAW format? Also what is the point argument? I guessed at Point2D but the exception I get when running that suggests it might just be an int?
Cheers
Alex
This email carries a disclaimer, a copy of which may be read at http://learning.longhill.org.uk/disclaimer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3440 bytes
Desc: not available
Url : http://mail.datenhain.de/pipermail/libavg-users/attachments/20100106/34bc4e94/attachment.bin
More information about the libavg-users
mailing list