我有一个简单的小osx应用程序,只需启动一个IKPictureTaker,然后将生成的图片保存为.tiff文件。这一切似乎都很好,但每次我拍摄照片时,我都会反复收到这个错误:
2009-11-10 12:25:38.890 Take A Picture[855:9c23] *** QTCaptureSession warning: Session received the following error while decompressing video: Error Domain=NSOSStatusErrorDomain Code=-67441 "Operation could not be completed. (OSStatus error -67441.)". Make sure that the formats of all video outputs are properly configured.代码非常简单:
- (void)awakeFromNib
{
IKPictureTaker *sharedPictureTaker = [IKPictureTaker pictureTaker];
[sharedPictureTaker setValue:[NSNumber numberWithBool:YES] forKey:IKPictureTakerShowEffectsKey];
[sharedPictureTaker beginPictureTakerWithDelegate:self didEndSelector:@selector(pictureTakerDidEnd:returnCode:contextInfo:) contextInfo:nil];
}
- (void) pictureTakerDidEnd:(IKPictureTaker *) picker
returnCode:(NSInteger) code
contextInfo:(void*) contextInfo
{
NSImage *image = [picker outputImage];
NSString *folder = @"/Users/Mike/Library/Application Support/file.tiff";
folder = [folder stringByExpandingTildeInPath];
[[image TIFFRepresentation] writeToFile:@"~/Library/Application Support/file2.tiff" atomically:NO];
}发布于 2009-11-11 06:26:22
听起来你的机器可能有一些配置问题。你能在另一个上测试它吗?你的应用程序中还发生了什么吗?如果你选择不同类型的图像文件,或者只在捕获时,你会得到同样的结果吗?
您的字符串在编写方法中有点混淆,但除此之外,代码在其他原始应用程序中工作得很好。
https://stackoverflow.com/questions/1710551
复制相似问题