开发者

How can i find the file type after loading NSImage withContentsOfFile

I need to know which image file type was used in the file i loaded with "initWithConte开发者_开发知识库ntsOfFie" because i don't want to trust the file extension.

Unfortunately i can't find anything about the format in NSImage and NSImageRep,


NSImage doesn't keep that information, because it's of no further use. You'll need to drop down to CGImageSource to get the info you want.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜