png - How to identify a NSData's image format? -


If I get an NSData that I know is the data of an image. But I do not know what this format is. So how can I identify which format is the format? JPEG or PNG?

PS: IOS

You can see and guess the first byte Are there. There are several lists of magic numbers available on the Internet, e.g. .

Comments

Popular posts from this blog

php - Creating canonical URLs with custom route-classes -

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -

Mysql Local server hardware -