Problem with CGImageDestination and file naming

前端 未结 1 492
不思量自难忘°
不思量自难忘° 2021-01-25 14:56

I am capturing images from the camera, using AVCapture as I have need of speed and the standard kit stuff is way too slow. I have problem whereby the file that is being output (

相关标签:
1条回答
  • 2021-01-25 15:51

    AFAIK this is a temporary file that CGImageDestinationFinalize makes, the reason you see them is that CGImageDestinationFinalize failed. I think that if you check the file sizes you'll see that the ones with mangled names have a file size of 0.

    I started check for succes after I got these files :)

    bool success =  CGImageDestinationFinalize(destination);
    CFRelease(destination);
    if (success) {
        NSLog(@"animated GIF file created at %@", path);
    } else {
        NSLog(@"failed to create gif at %@", path);
    }
    
    0 讨论(0)
提交回复
热议问题