NMR photography has gained significant attention as a method of storing and retrieving information using NMR spectroscopy. Among the commonly practiced methods the most important is the frequency encoding by use of a multi-frequency pulse on a liquid crystal molecule. We propose and demonstrate another robust method which relies on spatial encoding. Spatial information is mapped onto the spectrum, if excited and recorded in the presence of a gradient. The encoding is performed by applying a multi-frequency pulse in the presence of a gradient. The subsequent acquisition, under a gradient, helps storing this spatial information on a one-dimensional spectrum. Series of such spectra can also store two-dimensional patterns. This procedure is described and exemplified in this paper.