The use of a shape transition process to resize patterns prerecorded inside polystyrene film was discussed. Polystyrene was annealed above the glass transition temperature to obtain shape transition. A diffraction grating can also be transformed using the shape transition. The application of the shape transition process to nanofabrication was also discussed.