• ARTICLES
SEARCH

How-To Geek

How To Remove JPG Artifacts and Ugly Image Distortion From Photographs

sshot-310

JPG distortion, tiling, and artifacts can ruin an otherwise great image. While no technique can truly restore and image, here’s a How-to Geek tip on how to remove and repair JPG distortion and artifacts in a few easy steps.

Nothing shy of a miracle can recover the image data lost when an image is saved in a lossy format like JPG. But with some clever trickery and a little bit of Photoshop magic, you can fix the worst parts of your image and get a better result in almost no time at all. GIMP users, follow along, as this Photoshop howto is GIMP friendly. Keep reading to see how you can finally restore your images!

Fixing JPG Artifacts With Photoshop

sshot-291

JPG is a pretty amazing format, all things considered. But the lossy nature of the filetype can be an ugly mess. Let’s take a closer look at this image.

sshot-295

Without a lot of zoom, we can see a big problem with our image data. Tiling is obvious, and we can see some definite artifacts popping up in the whites of the eye. Let’s take some steps to reduce all of that ugly.

sshot-296

It can be a good habit to make a copy of your background image before making any changes, but in this case, it’s mandatory. Right click your background layer and select “Duplicate Layer.”

sshot-297

On your new duplicated layer, Navigate to Filter > Blur > Smart Blur. (GIMP users may have to use Gaussian Blur, which can give a similar effect, but doesn’t have the edge detection that “Smart Blur” has.) Reader Alz: Gimp has a “Selective Gaussian Blur” with edge detection, and “radius” and “Threshold” parameters.

sshot-298

These settings worked fairly well for this level of JPG distortion and tiling. If you have more, you can set your “Radius” and “Threshold” to higher settings. Quality settings should be set to “High,” although any setting will work just fine.

sshot-299

Depending on your success with the filter, you may decide to stop here. But it wouldn’t be very geeky of us to stop after just showing you how to use the smart blur filter. Keep reading and we’ll transform this filtered image into a much better final result.

Turning A Smart Blur Into An Image Without Artifacts

sshot-300

Our image clearly has some issues, even with the smart blur. We’ve lost detail and we’re getting some odd pixelation around some of the edges. We have sucessfully blotted out our tiling and distortion, but let’s see if we can’t get the best of both worlds from this image with a little bit of Photoshop geekery.

sshot-301

Create a layer mask on your Smart Blur layer by Alt + Clicking on the mask button in the layers panel. This will mask out all of this topmost layer revealing the original problematic JPG again.

sshot-302

Grab the brush tool and make sure you fill your sshot-311 Foreground color with white. Your brush should be set to a very soft hardness setting (0% shown above, is fine) with the size set appropriate to the size of your image. Work larger if you’re using a larger image, and smaller if you’re working with a smaller sized image.

sshot-303

Paint white into the image mask in the parts that you want to become smoother and less full of artifacts. Be careful around edges and don’t be afraid to undo and redo your work. Painting with black will hide your topmost layer, while white will make the Smart Blur layer reappear.

sshot-305

Selectively masking the Smart Blur layer will allow you to retain the critical details of the layer with JPG distortion, while eliminating or minimizing the artifacts and tiling.

sshot-312

Selectively changing your brush Opacity in the top options bar can also be helpful. Sometimes leaving some of the detail from the JPG layer can keep some of the texture, while minimizing the gross parts.

sshot-308

Without too much effort put into painting, we can see that our image is beginning to look much improved, despite artifacts and low pixel depth. Let’s look at how our mask looks, just to be clear.

sshot-306

At this point, we’ve only allowed our Smart blur to appear on the parts in our face. Here’s how the layer mask looks by itself. The white parts represent where we’ve painted with—you guessed it—our white brush.

sshot-307

Here’s our overlay, with the red parts representing where the Smart Blur layer is blocked out. Hopefully this makes it clear what you need to be doing with your paintbrush.

sshot-309

Again, it is impossible to recreate the image once it’s been saved in a lossy format, but clever Photoshop trickery can almost always improve it.

Smooth Out Artifacts, But Retain Detail

sshot-318

When you have skies or fields of color, you’ll find that the JPG format will create horrible distortions and textures that clearly weren’t present in the original photograph. Let’s look at one final example to show the usefulness of this trick.

sshot-313 sshot-314

This trick can be very helpful when you have these fields of open color combined with detail (such as this tree), because you can combine the best of both worlds.

sshot-315

Even at this horrendously small resolution, we can combine our smart blur layer with the detail in original JPG. The tree still looks like a tree, and the sky is smooth and artifact free.

sshot-316

And in no time at all, our distortions are cleared up while retaining detail in our foreground object.


So, did we hit the mark with this technique? Do you think you’ll be cleaning up your own images that JPG formats have made all cruddy? Or do you have your own slick Photoshop tricks or techniques for combatting this kind of image distortion? Tell us about them in the comments section below, or simply send us your graphics tips to ericgoodnight@howtogeek.com.

Image Credits: Esoteric ~ Socotra Island, Yemen by Martin Sojka, Creative Commons. Tree by Elizabeth Oldham, Creative Commons.

Eric Z Goodnight is an Illustrator and Graphics Geek who hopes to make Photoshop more accessible to How-To Geek readers. When he’s not headbanging to heavy metal or geeking out over manga, he’s often off screen printing T-Shirts.

  • Published 02/9/12

Comments (11)

  1. alz

    < Blur > Smart Blur. (GIMP users may have to use Gaussian Blur, which can give a similar effect, but doesn’t have the edge detection that “Smart Blur” has.)>>

    Gimp has a “Selective Gaussian Blur” with edge detection, and “radius” and “Threshold” parameters.

  2. Travis

    Nice. Is there any way to do this with Paint.Net?

  3. man

    just noticed you always do asian pics on photoshop tuts lol nvm btw Nice!

  4. Eric Z Goodnight

    There are just a lot of people in Asia, I guess! Although, this girl was from Yemen.

  5. Frank Anthony

    StudentTaking photoshop CS5.5 needs all the help I can get .

  6. Frank Anthony

    Goods stuff

  7. Frank Anthony

    Needs more of this photo shop trainning

  8. Bob-El

    I’d rather know how to do this in Gimp since I don’t have a million dollars to spend on Photoshop.

  9. Charlie

    Do you ever do any “How to’s for Corel Draw’s PhotoPaint ? This program is used a lot at large companies but never mentioned on any “How to” articles.

  10. Paulo Vitor Airaghi

    Hi @Eric Goodnight!
    As always, this tutorial Rocks! It’s just what I need.
    I’ve scanned some old pictures and repairing it in Photoshop. My scanner isn’t so good, making some tiling points and distortions, even if it’s in 1200dpi …
    Can I Ask you what’s your favourite format to scan a photo?
    Thanks a lot for your time!

  11. Barbara

    Thank you! I’m looking forward to trying this technique! I appreciate the tutes!

Enter Your Email Here to Get Access for Free:

Go check your email!