【发布时间】:2010-03-10 01:15:25
【问题描述】:
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 都错了吗?
【问题讨论】:
标签: cocoa itunes nsimage sourceforge-appscript