ImageFormatInspector 0.1.0

ImageFormatInspector 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2015

Maintained by David Sweetman.



  • By
  • David Sweetman

Installation:

Usage

#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!

Sample Project

There's a sample project too.

License

MIT