Skip to content

tsabend/MovingPictures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MovingPictures

CI Status Version License Platform

MovingPictures is a flexible library for turning images into movies.

Usage

/// Create your imageTimes
let imageTimes: [ImageTime] = [(image1, 1.5), (image2, 0.3)]
/// Create the settings for your video
let settings = RenderSettings(size: images1.size, videoFilename: "foo")
/// Make a new instance of MovingPictures
let writer = MovingPictures(settings: settings)
/// Render your images
writer.render(imageTimes) { (result: Result<NSURL, NSError>) in
  do {
    let url = try result.dematerialize()
    /// You now have the video's url and can do whatever with it...
  } catch {
    /// Figure out what went wrong and react accordingly
  }
}   

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

MovingPictures is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "MovingPictures"

Author

tsabend, tsabend@gmail.com

This code was inspired by the answers in http://stackoverflow.com/questions/3741323/how-do-i-export-uiimage-array-as-a-movie. Thanks to Scott Raposa and Praxiteles.

License

MovingPictures is available under the MIT license. See the LICENSE file for more info.