NSImage into a QTMovie Object
NSImage into a QTMovie Object
- Subject: NSImage into a QTMovie Object
- From: Development <email@hidden>
- Date: Thu, 3 Sep 2009 18:56:54 -0700
I'm newish to the QTKit. I'm trying to init a movie object then place
frames in individually. Each frame is an NSImage.
Here is the code I'm using:
qtMovieObject = [QTMovie movie]; //this is defined with the app starts
up
Then for each frame:
NSImage * screenImage = [[NSImage alloc]initWithCGImage:theFrame];
NSDictionary* movieAttributes = [NSDictionary
dictionaryWithObjectsAndKeys: @"tiff", QTAddImageCodecType, [NSNumber
numberWithLong: codecHighQuality],QTAddImageCodecQuality, nil];
[qtMovieObject addImage:screenImage
forDuration:QTMakeTimeWithTimeInterval(fps)
withAttributes:movieAttributes];
//[[screenImage TIFFRepresentation]writeToFile:[NSString
stringWithFormat:@"%@/%i.tif",tmpPath,frameNum]
// atomically:YES];
[qtMovieObject updateMovieFile];
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden