Added program for optimum image rotation