thumbnailImageAtTime,生成缩略图的大小?

时间:2013-11-29 15:01:52

标签: ios objective-c

使用:

UIImage  *thumbnail = [player thumbnailImageAtTime:0.0 timeOption:MPMovieTimeOptionNearestKeyFrame];

生成的缩略图的大小是多少?

2 个答案:

答案 0 :(得分:0)

用它来检查:

thumbnail.size.height;
thumbnail.size.width;

顺便说一下,不推荐使用该方法:

https://developer.apple.com/library/ios/documentation/mediaplayer/reference/MPMoviePlayerController_Class/DeprecationAppendix/AppendixADeprecatedAPI.html

答案 1 :(得分:0)

如果你想知道字节:

NSData *imgData = UIImageJPEGRepresentation(thumbnail, 0); 
NSLog(@"Size of Thumbnail in bytes:%d",[imgData length]);

在这里回答: https://stackoverflow.com/a/9076993/2889834