An open API service indexing awesome lists of open source software.

https://github.com/onmyway133/gifmagic

💈 Gif maker and extractor in Swift
https://github.com/onmyway133/gifmagic

compile extract frame gif modify video

Last synced: 25 days ago
JSON representation

💈 Gif maker and extractor in Swift

Awesome Lists containing this project

README

        

# GifMagic

❤️ Support my apps ❤️

- [Push Hero - pure Swift native macOS application to test push notifications](https://onmyway133.com/pushhero)
- [PastePal - Pasteboard, note and shortcut manager](https://onmyway133.com/pastepal)
- [Quick Check - smart todo manager](https://onmyway133.com/quickcheck)
- [Alias - App and file shortcut manager](https://onmyway133.com/alias)
- [My other apps](https://onmyway133.com/apps/)

❤️❤️😇😍🤘❤️❤️

[![CI Status](http://img.shields.io/travis/onmyway133/GifMagic.svg?style=flat)](https://travis-ci.org/onmyway133/GifMagic)
[![Version](https://img.shields.io/cocoapods/v/GifMagic.svg?style=flat)](http://cocoadocs.org/docsets/GifMagic)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![License](https://img.shields.io/cocoapods/l/GifMagic.svg?style=flat)](http://cocoadocs.org/docsets/GifMagic)
[![Platform](https://img.shields.io/cocoapods/p/GifMagic.svg?style=flat)](http://cocoadocs.org/docsets/GifMagic)
![Swift](https://img.shields.io/badge/%20in-swift%203.0-orange.svg)

## Encoder

#### Encode images into gif file

```swift
let url = Encoder().encode(images: images, frameDuration: 0.05)
```

## Decoder

#### Decode gif file into images and get info

```swift
let info = Decoder().decode(gifUrl: url)

info.images
info.frameDuration
info.pixelWidth
info.pixelHeight
```

#### Decode video file into images and get info

```swift
let info = Decoder().decode(videoUrl: url)

info.images
```

## Modifier

#### Modify each frame within the gif

```swift
let newGifUrl = Handler().modify(gifUrl: url, closure: { image in
// Handle image the way you want
return image
})
```

## Installation

**GifMagic** is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'GifMagic'
```

**GifMagic** is also available through [Carthage](https://github.com/Carthage/Carthage).
To install just write into your Cartfile:

```ruby
github "onmyway133/GifMagic"
```

**GifMagic** can also be installed manually. Just download and drop `Sources` folders in your project.

## Author

Khoa Pham, [email protected]

## Contributing

We would love you to contribute to **GifMagic**, check the [CONTRIBUTING](https://github.com/onmyway133/GifMagic/blob/master/CONTRIBUTING.md) file for more info.

## License

**GifMagic** is available under the MIT license. See the [LICENSE](https://github.com/onmyway133/GifMagic/blob/master/LICENSE.md) file for more info.