13.07.2015 Views

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Some Useful Examples and ScenariosOptimizing QuickTime VR Movies for Web PlaybackNote The constants MovieExportType and Movie<strong>File</strong>Type used in Listing 6-17 (page 366) aredefined in header files QuickTimeComponents.h and Movies.h respectively and are defined as'spit' and 'MooV'.You can present users with the QTVR Flattener’s own dialog box to allow them to choose options such as howto compress the preview image or to select a separate preview image file. Use the following code to show thedialog box:err = MovieExportDoUserDialog (qtvrExport, myQTVRMovie, nil, 0, 0,&cancel);If the user cancels the dialog box, then the Boolean cancel is set to true.If you do not want to present the user with the flattener’s dialog box, you can communicate directly with thecomponent by using the MovieExportSetSettingsFromAtomContainer routine as described in thefollowing paragraphs.If you want to specify a preview image other than the default, you need to create a special atom containerand then call MovieExportSetSettingsFromAtomContainer before calling MovieExportTo<strong>File</strong>. Youcan specify how to compress the image, what resolution to use, and you can even specify your own previewimage file to be used. The atom container you pass in can have various atoms that specify certain exportoptions. These atoms must all be children of a flattener settings parent atom.The preview resolution atom is a 16-bit value that allows you to specify the resolution of the preview image.This value, which defaults to kQTVRQuarterRes, indicates how much to reduce the preview image.The blur preview atom is a Boolean value that indicates whether to blur the image before compressing. Blurringusually results in a much more highly compressed image. The default value is true.The create preview atom is a Boolean value that indicates whether a preview image should be created. Thedefault value is true.The import preview atom is a Boolean value that is used to indicate that the preview image should be importedfrom an external file rather than generated from the image in the panorama file itself. This allows you to haveany image you want as the preview for the panorama. You can specify which file to use by also including theimport specification atom, which is an FSSpec data structure that identifies the image file. If you do not includethis atom, then the flattener presents the user with a dialog box asking the user to select a file. The default forimport preview is false. If an import file is used, the image is used at its natural size and the resolution settingis ignored.<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.367

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!