Cloaking and anamorphism for light and mass diffusion