Created
May 29, 2012 02:00
-
-
Save nazoking/2822127 to your computer and use it in GitHub Desktop.
get image mime type from base64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want this code for C#