A simple and universal technique is presented for compressing digital still pictures consisting of both graphics and natural images, each very different in nature. It is based on a nonseparable, two-dimensional, adaptive resampling scheme combined with adaptive quantization of the color intensity values. We show that the new method we propose encodes edges with high accuracy while compressing uniform regions with minimal contouring effects. A generalization of the concept yielding a modified quadtree-based coding scheme perfectly suited for two-dimensional data compression is also included. Finally, compression criteria that allow minimization of both the encoding time and the hardware complexity in the encoder is discussed.