Gif图的分解

NSString * path =[[NSBundle mainBundle]pathForResource:@"dog" ofType:@"gif"];
    NSData * data =[NSData dataWithContentsOfFile:path];
    CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL);
    //将gif分解成一帧帧
    size_t count=CGImageSourceGetCount(source);
    NSMutableArray * tmpArray =[[NSMutableArray alloc]init];
    for (size_t i=0; i

你可能感兴趣的:(ios)