More flexible and uniform image transformation