开发者

how do i detect a multi-layered psd file using imageIO.framework?

i don't want to extract or use the multi-layer information, i want to report to the user that it can't be imported. i'm creating specific-sized jpgs from imported files, and the user needs to decide how to flatten that multiple-layered file according to her aesthetic.

the only reference to multilayered i see is CGImageSourceGetCount(CGImageSourceRef)

If the image source is a multilayered PSD file, the function 开发者_如何学Goreturns 1.

which, of course, isn't helpful in my case.


From my own searching, you can't do this with ImageIO. The only way I've found to deal with multi-layer images is with the QuickTime image importers. See this link:

http://developer.apple.com/library/mac/#samplecode/ImproveYourImage/Listings/Source_MultipleImages_c.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜