in reply to image encode base64 - help needed

Have you tried also using binmode when reading the file?