updated load jpeg to use imagecreatefromstring