Removed urllib, changed function to take raw image file data instead.