Minor code tidy: move channel permutation into ImageMath.c