标题出现了问题。
是否有诸如“每秒仅导出3张图像”之类的限制?

        for (int frameStepper = 0; frameStepper < [Something frameCount]; frameStepper++)
        {
            //Get the filename.
            imagePath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"frame_%i.jpg", frameStepper]];

            //Read image.
            UIImage *image = [[[UIImage alloc] initWithContentsOfFile:imagePath] autorelease];

            //Write image.
            UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
        }


在此代码之后,我导出了10张图片中的5张。无法看到原因。请帮助,非常感谢。

最佳答案

这的一种变化对我有帮助:
http://iphoneincubator.com/blog/tag/uiimagewritetosavedphotosalbum

{
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotosAlbum: didFinishSavingWithError: contextInfo:), nil);

}


- (void)imageSavedToPhotosAlbum:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
    if (error) {
        [self tryWriteAgain:image];
    }
}

-(void)tryWriteAgain:(UIImage *)image
{
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotosAlbum: didFinishSavingWithError: contextInfo:), nil);
}

关于iphone - UIImageWriteToSavedPhotosAlbum仅保存10张图片中的5张。为什么?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6097459/

10-09 13:24