Git Product home page Git Product logo

kenburns's Introduction

Ken Burns

Single Images

burns

Queue Images

burns

A simple yet configurable Ken Burns effect. Use a single image or queue multiple images. The Kens Burns effect is a popular transition effect in film popularized by American documentarian Ken Burns. It creates the effect of motion using still imagery.

Usage

KenBurns is written in Swift, use KenBurnsImageView from Swift or Objective-C. Examples are in Swift 3.0:

func newKenBurnsImageView(url: URL) -> KenBurnsImageView {
    let ken = KenBurnsImageView()
    ken.fetchImage(url: url, placeholder: UIImage(named: "placeholder"))
    ken.startAnimating()
    return ken
}

func stop(ken: KenBurnsImageView) {
    ken.stopAnimating()
}

func pause(ken: KenBurnsImageView) {
    ken.pause()
}

func resume(ken: KenBurnsImageView) {
    ken.resume()
}

Initialize with UIImage or URL, and there are some paramaters you can set to configure the appearance:

func newKenBurnsImageView(image: UIImage) -> KenBurnsImageView {
    let ken = KenBurnsImageView()
    ken.setImage(image: image)
    ken.zoomIntensity = 1.5
    ken.setDuration(min: 5, max: 13)
    ken.startAnimating()
    return ken
}

Ken Burns has been powering Calmโ€™s nature scenes and meditations since 2016. We found that adding this effect in place of a static image improves click-through rates (and users love it).

Due to unfortunate circumstances, Calm has no direct affiliation with Ken Burns himself ๐Ÿ˜ž

Demo

Launch and run

roadtrip.xcworkspace

To view demo

Installation

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

pod "KenBurns"

kenburns's People

Contributors

tsheaff avatar thbaja avatar rlester avatar chinhpn-2177 avatar mejackreed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.