Skip to content

Instantly share code, notes, and snippets.

View margox's full-sized avatar
😁
ssssss~~~~~~~~~~

超能刚哥 margox

😁
ssssss~~~~~~~~~~
View GitHub Profile
@margox
margox / GIF2MP4.swift
Created November 24, 2017 09:48 — forked from powhu/GIF2MP4.swift
Swift 3.0 GIF to MP4
//
// GIF2MP4.swift
//
// Created by PowHu Yang on 2017/1/24.
// Copyright © 2017 PowHu Yang. All rights reserved.
//
/*
let data = try! Data(contentsOf: Bundle.main.url(forResource: "gif", withExtension: "gif")!)
let tempUrl = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("temp.mp4")
GIF2MP4(data: data)?.convertAndExport(to: tempUrl, completion: { })