The large curvature effects on micromagnetic energy of a thin ferromagnetic film with nonlocal dipolar energy are considered. We predict that the dipolar interaction and surface curvature can produce perpendicular anisotropy which can be controlled by engineering a special type of periodic surface shape structure. Similar effects can be achieved by a significant surface roughness in the film. We show that in general the anisotropy can point in an arbitrary direction depending on the surface curvature. We provide simple examples of these periodic surface structures to demonstrate how to engineer particular anisotropies in the film.