Coder Social home page Coder Social logo

kanvas-ios's Introduction

kanvy

Kanvas

Kanvas Build Status

Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

It is used in the Tumblr iOS app as a camera, media editor, GIF maker, and media posting tool.

Setup

Add this to your Podfile:

pod 'KanvasCamera', :git => 'https://github.com/tumblr/kanvas-ios.git'

And run:

pod install

Usage

Kanvas is mainly two parts: the Camera, and the Editor. Both are just view controllers that you present, and have settings and delegates that help you customize their behavior.

To show the camera:

let settings = CameraSettings()
let camera = CameraController(settings: settings)
present(camera, animated: true)

And to edit existing media, like a video:

let videoURL = URL(string: "path/to/video.mov")
let settings = CameraSettings()
let editor = EditorViewController.createEditor(for: videoURL, settings: settings)
present(editor, animated: true)

Each view controller accepts a CameraSettings object, which provides fine-grained settings and feature togges. Each view controller also has a delegate property for providing your own handlers to creating media, performing editing operations, logging, or really anything else Kanvas can do.

Documentation is lacking at the moment, but contributions are welcome!

Example App

KanvasCameraExample is an example app showing how to use Kanvas. Try it out!

  1. Run cd KanvasCameraExample; bundle exec pod install
  2. Open KanvasCameraExample/KanvasCameraExample.xcworkspace in Xcode
  3. Run the app on a device.

kanvas-ios's People

Contributors

benjamin-su avatar bjtitus avatar ctarda avatar danielebogo avatar gmazzei avatar jschementi avatar krze avatar

Watchers

 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.