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.
在 Mac OS X 10.7 中使用 Objective-C 获取视频的原始大小(宽度和高度)的最简单方法是什么?
假设这部电影是 QuickTime 可读的——如果不是,你可能无论如何都不走运——这样的事情应该可以解决问题,我认为:
QTMovie* movie = [QTMovie movieWithFile:movieFileName error:nil]; NSSize size = [(NSValue*)[movie attributeForKey:QTMovieNaturalSizeAttribute] sizeValue];
(注意:未经测试,没有错误检查等)