Currently i'm writing a video player which uses cairo to draw subtitle on each frame.<div>I successfully extracted all the frames as PIL Image objects, but I failed to create cairo surfaces with that.</div><div>I refered to <a href="http://cairographics.org/pythoncairopil/">http://cairographics.org/pythoncairopil/</a> , but it seems that maybe there're some problems in the document.</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>Here is the traceback:</div><div><br></div><div><div> File "main.py", line 96, in video_observer</div><div> img.get_data(), 'raw', 'RGBA', 0, 1)</div>
<div> File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 512, in __getattr__</div><div> raise AttributeError(name)</div><div>AttributeError: get_data</div></div><div><br></div>