ImageFormatInspector 0.1.0

ImageFormatInspector 0.1.0

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布时间上次发布2015年3月

David Sweetman 维护。



  • 作者
  • David Sweetman

安装

使用方法

#import ImageFormatInspector.h

NSData *imageData = /* some NSData from a web service or something */

ImageFormat format = imageFormatForImageData(imageData);

if (format != ImageFormatUnkown) {
    NSLog(@"It's got some kind of known valid image header.");
}

if (format == ImageFormatJPEG) {
    NSLog(@"Its a JPEG!");
}
// Also detects ImageFormatPNG, ImageFormatTIF.
// If you need to know other formats, feel free 
// to add them and submit a PR!

示例项目

还有一个示例项目。

许可证

MIT