QTMovie from NSImage
QTMovie from NSImage
- Subject: QTMovie from NSImage
- From: Eric Brunstad <email@hidden>
- Date: Fri, 10 Jun 2005 07:53:14 -0400
Hi,
I'm trying to create a 10-second-long QTMovie from a single NSImage
and export it to a .mov file. Here's what I have so far:
NSImage *image // instance variable
QTMovie *exportMovie = [[QTMovie alloc] init];
[exportMovie setAttribute:[NSNumber numberWithBool:YES]
forKey:QTMovieEditableAttribute];
[exportMovie setAttribute:[NSNumber numberWithBool:YES]
forKey:QTMovieHasDurationAttribute];
[exportMovie setAttribute:[NSNumber numberWithBool:YES]
forKey:QTMovieHasVideoAttribute];
[exportMovie addImage:image
forDuration:QTMakeTimeWithTimeInterval(10) withAttributes:nil];
Movie movie = [exportMovie quickTimeMovie];
ConvertMovieToFile(movie,
nil,
nil,
0,
0,
-1,
nil,
createMovieFileDeleteCurFile |
showUserSettingsDialog |
movieToFileOnlyExport,
0);
[exportMovie release];
This does show the "Save exported file as..." dialog, but it only
gives the option to save the movie as a "Movie to QuickTime Media
Link." And, when I click "Save," nothing happens.
I suppose the problem is with the initialization of the movie,
because the dialog works when I pass it other movies. Any help would
be appreciated.
Eric Brunstad
Mind Sprockets Software
email@hidden
www.mindsprockets.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden