在iOS中高性能和简便的方式播放APNG格式:APNGKit

ygp8 9年前

APNGKit

APNGKit是一个高性能的框架用于在iOS中加载和展示APNG图片。它构建在一个支持APNG修改过的libpng版本 之上,采用Swift开发。

// Load an APNG image from file in main bundle  var image = APNGImage(named: "your_image")    // Or  // Load an APNG image from file at specified path  var path = NSBundle.mainBundle().pathForResource("your_image", ofType: "apng")  if let path = path {    image = APNGImage(contentsOfFile: path)    }    // Or  // Load an APNG image from data  let data: NSData = ... // From disk or network or anywhere else.  image = APNGImage(data: data)

项目主页:http://www.open-open.com/lib/view/home/1441377184987