Latest 1.0.0
Homepage https://github.com/alfiehanssen/GIFSet
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, MobileCoreServices, AVFoundation, CoreGraphics, UIKit, ImageIO
Authors

GIFSet is a simple toolset for creating GIFs and GIF-like videos. Check out a quick demo video here.

Setup

Cocoapod

Add this to your podfile:

target '{YourTarget}' do
    pod 'GIFSet', '{LatestVersionNumber}'
end

Submodule

git submodule add [email protected]:alfiehanssen/GIFSet.git and add the source files to your project/target.

Framework

git clone [email protected]:alfiehanssen/GIFSet.git, open the workspace, build the GIFSet scheme, and add the resulting GIFSet.framework to your project.

Usage

Check out the NSOperation subclasses. See them used in the example app in this repo. Briefly, here’s what they can do:

  1. GIFOperation: creates a GIF of a specified duration from an array of images

  2. CompositionOperation: Creates an AVMutableComposition from an array of AVAssets

  3. ImageExtractionOperation: Extracts a set of images at specific CMTimes from an AVComposition

  4. ImageConcatenationOperation: Concatenates an array of images into a GIF-like video of a specified duration

  5. VideoGIFFromVideoOperation: Uses the above operations to create a GIF-like video given an AVAsset (to extract the images from), a number of images to extract, and a duration for the final output

  6. GIFFromVideoOperation: Uses the above operations to create a GIF given an AVAsset (to extract the images from), a number of images to extract, and a duration for the final output

TODO

  • Determine if we can create a GIF-like video by reading and writing the asset using AVAssetReader/Writer. Instead of by extracting images which is time consuming.
  • Test videos of various orientations, resolutions
  • Unit tests

Want to Contribute?

If you’d like to contribute, please follow the guidelines found in CONTRIBUTING.

Found an Issue?

Please file any and all issues found in this library to the git issue tracker.

Questions?

Tweet at me here: @alfiehanssen.

License

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

Credits

The video used in the example app was shot by @ghking

The name GIFSet sorta sounds like DIPSET

alt tag

Latest podspec

{
    "name": "GIFSet",
    "version": "1.0.0",
    "summary": "A simple toolset for creating GIFs and GIF-like videos.",
    "description": "A collection of NSOperation subclasses that leverage AVFoundation tools to create GIFs and GIF-like videos from one or many AVAssets or UIImages.",
    "homepage": "https://github.com/alfiehanssen/GIFSet",
    "license": "MIT",
    "authors": {
        "Alfie Hanssen": "[email protected]"
    },
    "social_media_url": "https://twitter.com/alfiehanssen",
    "source": {
        "git": "https://github.com/alfiehanssen/GIFSet.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "GIFSet/GIFSet/Source/**/*.{h,m}",
    "frameworks": [
        "Foundation",
        "MobileCoreServices",
        "AVFoundation",
        "CoreGraphics",
        "UIKit",
        "ImageIO"
    ]
}

Pin It on Pinterest

Share This