Remove noise on edge (compression deffects)
The Total Variation (TV, a.k.a. Rudin-Osher-Fatemi functional) denoising wold help here.
You can apply it on every color layer or look for a vectorized version if th eresults ar enot good enough for you.

Good references of tsable and easy to implememnt algorithms for TV denoising are for example:


Chambolle's algorithm
the Chambolle-Pock primal dual algorithm


Both references have good performance and are easy to implement from the papers.