简体   繁体   中英

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

  1. Decode from base 64.
  2. Examine the file header .
  3. If the first three bytes are GIF , it's a GIF.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM