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

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -