aTrack 是一个 ITReference* 对象,value 是一个 NSImage* 对象,通过 URL 初始化为 jpeg。
[[[[[aTrack artworks] data_] set] to:value] send];
我在 GDB 中收到以下消息:
2010-03-09 16:59:42.860 Sandbox[2260:a0f] Can't pack object of class NSImage (unsupported type): <NSImage 0x10054a440 Size={0, 0} Reps=(
然后我尝试了以下代码:
NSData *imageData = [[NSData alloc] initWithData:[value TIFFRepresentation]];
[[[[[aTrack artworks] data_] set] to:imageData] send];
而是收到此消息
2010-03-09 16:46:09.341 Sandbox[2193:a0f] Can't pack object of class NSConcreteData (unsupported type): <4d4d002a 00000000>
在 AppScript 文档中,它说“艺术品”项目的“数据”属性是 PICTPicture 图像。
如何将 NSImage 转换为 PICT?我使用的 AppScript 都错了吗?