views:

61

answers:

1

I have a simple little osx app that just starts up an IKPictureTaker and then saves the resulting picture as a .tiff file. It all seems to work fine but everytime I take the picture I get this error repeatedly:

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.

The code is pretty simple:

- (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];
}
+1  A: 

Sounds like there might be some configuration issue with your machine. Are you able to test it on another? Is there anything else going on in your app? Do you get the same thing if you select different kinds of image files or only when capturing?

Your strings are a bit mixed up in the writing method, but that aside the code works fine for me in an otherwise virgin app.

walkytalky
I will try and test it on another machine when I can get access to one. This is the whole app. I only get these messages when capturing. You had your debugger console open when running this code correct?
Mike2012
I started over and re did all the steps (without some unneeded steps I may have taken while trying to set it up the first time) and now it works fine. Thanks for taking the time to run my code.
Mike2012