1. A method of image compression, the method comprising: generating, by one or more processors, a modified image based on a compression of an image; generating, by the one or more processors, two residual layers that include a first residual layer and a second residual layer based on a comparison of the modified image and the image, wherein the first residual layer comprises one or more first pixels added to the image and the second residual layer comprises one or more second pixels removed from the image during the compression of the image; filtering, by the one or more processors, a set of pixels from the first residual layer and the second residual layer; compressing, by the one or more processors, the filtered first residual layer and the filtered second residual layer to generate a compressed first residual layer and a compressed second residual layer; and generating, by the one or more processors, a second compressed image based on the modified image, the compressed first residual layer and the compressed second residual layer.