Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不想提取或使用多层信息,我想向用户报告它无法导入。我正在从导入的文件创建特定大小的 jpg,用户需要根据她的审美来决定如何展平该多层文件。
我看到的对多层的唯一参考是CGImageSourceGetCount(CGImageSourceRef)
CGImageSourceGetCount(CGImageSourceRef)
如果图像源是多层 PSD 文件,则函数返回 1。
当然,这对我的情况没有帮助。
根据我自己的搜索,您无法使用 ImageIO 执行此操作。我发现处理多层图像的唯一方法是使用 QuickTime 图像导入器。请参阅此链接:
http://developer.apple.com/library/mac/#samplecode/ImproveYourImage/Listings/Source_MultipleImages_c.html