Make the img rotation function static
Merge branch 'dev_imgrotation' into preinstall