Possible technique may be found at: http://stackoverflow.com/questions/5905868/am-i-making-this-too-complicated-image-rotation