[Image-SIG] loading PIL image to pygame without the need to

Jelle Feringa / EZCT Architecture & Design Research jelle.feringa at ezct.net
Sat May 7 16:25:16 CEST 2005

Hi Frederik,

That definitely solved my troubles, thanks a lot!
Sorry for the crash confusion; PyMedia so far has no polite way of saying
'the data you supplied is corrupt' but grinds python to a halt.
Is use the following code now, which is working just swell!



            img = pygame.image.frombuffer(blend.tostring(), blend.size,
            img = pygame.image.tostring(img, "RGB")
            bmpFrame= vcodec.VFrame(vcodec.formats.PIX_FMT_RGB24, sizeBlend,
            print 'bmpFrame'
            yuvFrame= bmpFrame.convert(vcodec.formats.PIX_FMT_YUV420P)
            print 'yuvFrame'
            d = e.encode(yuvFrame)
            print 'encode yuv - frame'
            print 'write frame to video file'

More information about the Image-SIG mailing list