We report the near-field investigation on azobenzene contained polymer films using scanning near-field optical microscopy. Nanometer scale dots and lines were inscribed on these films, and the topographies and transmitting images of these patterns could be obtained at the same time. The transmitting images were in agreements with the topographies, and it proved that trans-cis isomerization of the azobenzene moieties in the illuminated area induced both surface relief and anisotropy. The experimental results helped to discover the mechanism of the photo induced surface relief and anisotropy, and the agreement between the transmitting images and the topographies could be applied in pure optical writing/reading in high-density data storage.