Solved by Nikronic in post #2 
              
              
                Hi, 

Solution: 
pic = pic.astype(np.uint8)

Reason: 
Python int dtype is 64bits so it does not work on PIL images. If you scroll down the documentation of ToPILImage, you will find a link to all modes that PIL supports. https://pillow.readthedocs.io/en/latest/handbook/concepts.html#modes 
In this p…