Representation and compression of images with the aid of m-adic coordinate systems