Script that rotates background image?

 From:  Max Smirnov (SMIRNOV)
8317.8 In reply to 8317.7 
Hi Martin,

this task is not easy :)
imp.frame specifies position of lower left corner of the image.

To rotate image around its center you need to find a central axis coordinates.
p0 = img.frame.evaluate(img.width/2, img.height/2, 0);
p1 = img.frame.evaluate(img.width/2, img.height/2, 1);

Then you need to rotate img.frame.origin, img.frame.xaxis and img.frame.yaxis points around this vector.
You can use google to find articles with titles like "Rotation about an arbitrary axis"

Also you can check my nodeeditor project. core/litegraph.js -> rotateAroundNormalizedVector function