Check whether base64 string is a GIF image
I have a base64 encoded string and I want to find out whether that string contains开发者_如何学编程 a GIF image or not.
How will I do that in C#?
- Decode from base 64.
- Examine the file header.
- If the first three bytes are
GIF
, it's a GIF.
精彩评论