read jpg file to base64