I have this image that have been damaged by JPG, and would very much like to restore it, as if it had never been compressed with JPG.
Can someone help me with this? I assume I need to fill with similar colours to get the sharp edges back?
If this image is representative of your other images, with large, flat areas of color, then a simple color quantize can give a good result. In the sample images there are only three intended colors: two shades of grey, and yellow.
Open the image in Photoshop, and choose Image > Mode > Indexed Color
Change the three colors to:
And apply. You should get this:
My approach would be to use
Select > Color Range:
Eyedropper a clean area of the yellow to make it the foreground color. Be sure to set the sampling to 3x3 or 5x5, not single pixel.
Select > Color Range and click the "+" icon in the dialog. Work with the image until all the icon pixels are selected but none of the background (should be easy).
Ctl/Cmd-J to copy the selected area to a new layer.
Add a layer below this and fill with black.
You can Zoom in and clean up any rough bits with a single-pixel eraser tool, but I suspect that won't be necessary.