Lossless compression of all images