Version: 1.0

Posted: 2003-01-14

Build Requirements: N/A

Runtime Requirements: Carbon

View Source Code:

Download Sample (“CocoaCreateMovie.zip”, 547.7K)
Download Sample (“CocoaCreateMovie.dmg”, 589.4K)



Description

This sample demonstrates how to create a QuickTime movie from a set of Cocoa jpeg NSImage objects. Specifically, the movie video track is built from the images. This is accomplished by creating a QuickDraw GWorld, copying the raw jpeg data from the NSImage into the GWorld, re-compressing the data using the QuickTime CompressImage function, and adding it to the video track of the movie. We use the NSBitmapImageRep -bitmapData method to access the raw jpeg NSImage data. The 24-bit image data is simply copied into the 32-bit GWorld (with zeros for the alpha component). Finally, the resulting movie is displayed in a window using the NSMovieView.

Document Revision History

Date Notes
2003-01-14Demonstrates how to create a QuickTime movie from a set of Cocoa JPEG NSImage objects.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.