This video shows you how to rotate an image in python with processing 3 ( rotate, pushmatrix popmatrix)
when you execute for the first time the code there is an error :
size(displayWidth, displayHeight, P3D)
displayWidth = width and displayHeight = height
when you execute it for the second time it is OK :-)
it is also possible to write this
size(1300, 700, P3D)