I am writing a Python script where I want to do bulk photo upload. I want to read an Image and convert it into a byte array. Any suggestions would be greatly appreciated.
i don't know about converting into a byte array, but it's easy to convert it into a string:
import base64 with open("t.png", "rb") as imageFile: str = base64.b64encode(imageFile.read()) print str
Source