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.
Use bytearray:
bytearray
with open("img.png", "rb") as image: f = image.read() b = bytearray(f) print b[0]
You can also have a look at struct which can do many conversions of that kind.