Permutation, pow, rotate image