I'm trying to use the QuickTime support in 2.4.1, by way of Bob Ippolito's
"official unofficial" framework build installer, on Mac OS X 10.4.2 (Tiger).
However, in trying even the simplest of GraphicsImport manipulations, I hit
a TypeError:
from Carbon.Qt import *
fn = "/tmp/testpic.jpg"
ci = GetGraphicsImporterForFile(fn)
pic = GraphicsImportGetAsPicture(ci)
results in:
Traceback (most recent call last):
File "pyqt2.py", line 6, in ?
pic = GraphicsImportGetAsPicture(ci)
TypeError: Component required
Looking at the documentation[1] for the routine, it expects a
GraphicsImportComponent.
Looking at the Component Types document[2], that's typedef'ed as a
ComponentInstance.
However, Mac/Modules/qt/qtsupport.py in 2.4.1 says:
GraphicsImportComponent = OpaqueByValueType('GraphicsImportComponent',
'CmpObj')
This defines it as a Component, rather than a ComponentInstance
(CmpInstObj). Several other types have the same problem.
[1]
http://developer.apple.com/documentation/QuickTime/APIREF/graphicsimportget
aspicture.htm
[2]
http://developer.apple.com/documentation/QuickTime/APIREF/ComponentTypes.htm
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig