• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
QTMovie from NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Multi-User using Core Data?
  • Next by Date: xcode keeps crashing when i compile
  • Previous by thread: Encoding of CFXML strings
  • Next by thread: xcode keeps crashing when i compile
  • Index(es):
    • Date
    • Thread