• Stars
    star
    526
  • Rank 84,247 (Top 2 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 10 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easily convert a video to a GIF on iOS.

Regift

Easily convert a video to a GIF on iOS and OSX.

Travis Version License Platform Carthage compatible




πŸš€

I also make Rocket, an app that gives you Slack-style emoji everywhere on your Mac.


Demo image of Rocket





Requirements

  • Xcode 10+
  • iOS 11.1+ / macOS 10.12+
  • Swfit 5.0+

Installation

Cocoapods

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

pod "Regift"

Carthage

Regift is available through Carthage.

github 'matthewpalmer/Regift'

Quick Start

import Regift

Synchronous GIF creation:

let videoURL   = ...
let frameCount = 16
let delayTime  = Float(0.2)
let loopCount  = 0    // 0 means loop forever

let regift = Regift(sourceFileURL: videoURL, frameCount: frameCount, delayTime: delayTime, loopCount: loopCount)
print("Gif saved to \(regift.createGif())")

let startTime = Float(30)
let duration  = Float(15)
let frameRate = 15

let trimmedRegift = Regift(sourceFileURL: URL, startTime: startTime, duration: duration, frameRate: frameRate, loopCount: loopCount)
print("Gif saved to \(trimmedRegift.createGif())")

Asynchronous GIF creation:

let videoURL   = ...
let frameCount = 16
let delayTime  = Float(0.2)
let loopCount  = 0    // 0 means loop forever

Regift.createGIFFromSource(videoURL, frameCount: frameCount, delayTime: delayTime) { (result) in
    print("Gif saved to \(result)")
}

let startTime = Float(30)
let duration  = Float(15)
let frameRate = 15

Regift.createGIFFromSource(videoURL, startTime: startTime, duration: duration, frameRate: frameRate) { (result) in
    print("Gif saved to \(result)")
}

Acknowledgements

Thanks to Rob Mayoff's Gist, without which this library wouldn't exist.

My personal thanks to all of Regift’s contributors:

  • caughtinflux
  • samuelbeek
  • sebyddd
  • nakajijapan
  • dbburgess

More Repositories

1

Locksmith

A powerful, protocol-oriented library for working with the keychain in Swift.
Swift
2,916
star
2

Charter

A Swift mailing list client for iPhone and iPad
Swift
528
star
3

Playdown

Convert Swift Playgrounds to Markdown
Swift
55
star
4

Responsive-iOS-Grid-System

A grid system for iOS views. Uses percentages (well, fractions) so you can design for all screens in one go.
Objective-C
51
star
5

.todo

.todo is a text-based formatting/markdown language for todo lists.
30
star
6

monitor-twitter

Monitor Twitter for tweets from a certain user that match a given pattern.
JavaScript
19
star
7

stockscraper

Scrapes Google's stock API
JavaScript
17
star
8

NSCharacterSet-EmojiCharacterSet

An NSCharacterSet containing all of the available emoji.
Swift
9
star
9

long-running-pubsub

A Google Cloud Pub/Sub client with better support for long running tasks.
JavaScript
7
star
10

matthewpalmer.github.io

My website.
HTML
7
star
11

json-tape

Executes a series of commands on an initial state.
JavaScript
6
star
12

swift-deck

A generic Deck type in Swift.
Shell
5
star
13

RegiftDemo

Demo of my library Regift, for converting a gif to a video on iOS
Swift
3
star
14

MPTwitterBones

A barebones template for basic twitter authentication and getting the user's timeline using integrated iOS accounts
Objective-C
3
star
15

better-terms-of-service

Like 500px, it presents the complex legal jargon next to the simplified English translation.
2
star
16

basil

Basil is a simple typography template for responsive websites.
2
star
17

node-io-process-pool

A Node.js process pool for long running I/O processes
JavaScript
2
star
18

generaterandom

A quick way to generate a random alpha-(and/or)-numeric strings of any length
JavaScript
2
star
19

hashit

A simple way to hash passwords/codes/secret things
JavaScript
2
star
20

generator-demo

Demo project for a blog post on generators
Swift
2
star
21

postdata

Extract the POST data from a request
JavaScript
2
star
22

slender

A thin front end framework for interacting with a RESTful API.
JavaScript
2
star
23

node-rapidjson

Node.js β†”οΈŽ C++ bindings for RapidJSON
C++
2
star
24

tablog

My tablog
HTML
1
star
25

save-form-input-and-export-to-txt

Autosaves form input and then exports it to a .txt file when you're ready
1
star
26

node-js-tdd-demo

A quick example of TDD with Node.js, Mocha and Expect.js
JavaScript
1
star
27

Dictum

Dictum is a dictionary app for iOS.
Objective-C
1
star
28

link-from-list

Makes a list of HTML links from plain text urls
Python
1
star
29

loggingtofile

Logging to a file.
JavaScript
1
star
30

CollapsibleTextView

Swift
1
star
31

bitutils

Simple utility functions for bitwise manipulation
C
1
star
32

jape

Jape is an easy way to convert a JSON object to a string for use in URLs and APIs.
JavaScript
1
star