https://github.com/onmyway133/gifmagic
💈 Gif maker and extractor in Swift
https://github.com/onmyway133/gifmagic
compile extract frame gif modify video
Last synced: about 1 year ago
JSON representation
💈 Gif maker and extractor in Swift
- Host: GitHub
- URL: https://github.com/onmyway133/gifmagic
- Owner: onmyway133
- License: other
- Created: 2017-08-01T08:58:54.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-05-12T21:32:12.000Z (about 6 years ago)
- Last Synced: 2025-05-07T14:12:45.514Z (about 1 year ago)
- Topics: compile, extract, frame, gif, modify, video
- Language: Swift
- Homepage:
- Size: 31.3 KB
- Stars: 48
- Watchers: 4
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
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/)
❤️❤️😇😍🤘❤️❤️
[](https://travis-ci.org/onmyway133/GifMagic)
[](http://cocoadocs.org/docsets/GifMagic)
[](https://github.com/Carthage/Carthage)
[](http://cocoadocs.org/docsets/GifMagic)
[](http://cocoadocs.org/docsets/GifMagic)

## 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, onmyway133@gmail.com
## 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.