Skip to content

Instantly share code, notes, and snippets.

@nazoking
Created May 29, 2012 02:00
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save nazoking/2822127 to your computer and use it in GitHub Desktop.
Save nazoking/2822127 to your computer and use it in GitHub Desktop.
get image mime type from base64
function guessImageMime(data){
if(data.charAt(0)=='/'){
return "image/jpeg";
}else if(data.charAt(0)=='R'){
return "image/gif";
}else if(data.charAt(0)=='i'){
return "image/png";
}
}
@sajjadrajaee
Copy link

I want this code for C#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment