We derive a general theory for imaging by a flat lens without optical axis. We show that the condition for imaging requires a material having elliptic dispersion relations with negative group refraction, equivalent to an effective anisotropic refractive index n(theta). Imaging can be achieved with both negative (n<0) and positive (n>0) refractive indices. The Veselago-Pendry lens is a special case with isotropic negative refractive index of n(theta)=-1. Realizations of the imaging conditions using anisotropic media and inhomogeneous media, particularly photonic crystals, are discussed. Numerical examples of imaging and requirements for sub-wavelength imaging are also presented.