Getting Rid of Jaggies on Your Photo Borders
During a recent moodboard review, the design team got to wondering what the best solution was for getting rid of Photoshop "jaggies," those jagged edges that show up on your nice clean shapes; especially when you start rotating them. I had a few ideas but decided to do some tests to see what REALLY works best. I started my testing with a common design element that falls prey to jaggies: a photo with a white border, slightly rotated. The photo I’m working with happens to be of my ultra adorable dog Bruiser. First, I created two versions—one photo with an 8-pixel white inside stroke (Layer Style > Stroke) and one photo with a white square shape layer behind it. Then I rotated both sets 8 degrees clockwise.
As you can see, the shape layer gives you a cleaner edge but the jagged edges are still pretty noticeable. If you rasterize the shape layer BEFORE rotating, results improve.
Still not great though. I’m looking for the ultimate solution, so let’s keep going with a few more tricks. First, if you scale the photo down by a nice number (like 75% or 50%), the resampling seems to clean up the edges. This mean’s you’d have to think ahead too much though ... not ideal. So how about a mask?
If you select your layer (Ctrl/Cmd-D) and add an alpha mask, then add about a 1.5 pixel Guassian blur (Filter > Blur > Gaussian) to that mask layer, you get a softer edge.
If you want sharp corners, the mask technique is the best one I found. If you want absolutely no jaggies and don’t mind a little rounded corner, here’s one last trick: Select the photo layer shape (Ctrl/Cmd-D again) and hit Select > Refine Edge. Contract your edge by 2 pixels and feather the edge by 1 pixel. Invert your selection (Command-Shift-I) and delete that outside edge. You end up with a blurred edge. Copy your layer about 5-6 times, then flatten them all together, and voila! The cleanest edges in town.
What’s your solution for beating the jaggies?
A similar solution, but that allow you to edit the border at any time.
First, add an inner stroke effect, like you did at the beggining. It doesn’t matter if you rotate the image before or after.
Then, convert the layer into a smart object. If you want to change the stroke later, you just have to edit the smart object.
As it’s a smart object, you can add a smart filter, so add a very light gaussian blur (i use 0.6). The good thing about this is that you can also darken the smart filter’s mask in the corners to avoid the rounded corners.
There it is, 100% editable, and a perfect result :)
Unfortunately there are still some jagged edges around the photograph itself.
Would selecting the photographer layer and adding a bit of a feather to it help?
This post got me curious so I went in and tried some approaches of my own. This seems to produce pretty smooth and pretty sharp corners:
select the white square, and add an inner glow layer style.
Setting should be:
Blend Mode normal.
Opacity 100%
color is whatever background color you have
choke 0px
width 1px
and if you want it just a little smoother check “anti-aliasing” at the bottom under quality.
looks great to me and it has the added bonus of being easy to duplicate to a lot of different photos as long as they’re on the same background.
For the edges of the photo itself I used the same technique with the color set to white. the anti-aliasing checkbox helps here, but it was only able to smooth 2 of the 4 sides. strange.
Awesome suggestions - thanks all! I love that you found a way that works without flattening, I was hating to do that.
Brilliant techniques ;)
This is a problem that plagues so many sites. Nice to see someone else talking about it. A mark of a good designer is someone who cleans this sort of thing up.
Jaggies are especially bad on more than just rotations. Have you seen how bad some of the angled screenshot effects are?
When redesigning the Jive site I had an idea that worked out brilliantly. Fortunately I had a design minion to help experiment with it, lest I lose my patience.
Photoshop’s rotation and angled interpolation of crisp edges sucks. Now think about a program where it doesn’t suck?
Think about it.
That’s right. Illustrator. With a little work you can get a nice workflow going between photoshop and illustrator, where you do the rotating, skewing and 3d angles to your hearts content. All without jaggies.
Josh explores it in depth here: http://pixelmatrixdesign.com/blog/comments/making_beautiful_apple_style_screenshot_layouts/
Thanks for sharing these great tips guys.
I recently embarked upon a trip to Mongolia in an old Suzuki Vitara to help raise money for a few charities (only got to Kazakhstan though unfortunately!) and managed to take thousands of photo’s of the 5,000-odd miles we covered.
I have been trying to put together some of these photo’s in a nice composition ever since, and the thing putting me off rotating the pictures was the jagged edges that Photoshop creates. I’ve had a quick play and early indications suggest that I can get along with the techniques shown above, so thank you very much for the handy tips!
Paul - whatever route you go, don’t forget to create a Photoshop Action for it so you don’t have to do this by hand! I’m sure you have some amazing photos to share.
Not a bad attempt, however now you will need a tutorial called “getting rid of the blurries”.
Still leaves us with a noticeable edge blur. I wonder if there is any solution to this at all given the nature of pixels.
Great site!
Trackback URL: http://www.viget.com/trackback/1207/
Comments for this entry were closed after 60 days.
Next entry: Resizing rounded rectangles in Photoshop
Previous entry: Typography Tuesday: Let it Breathe

Recent Comments
The capcha code was Ill and so is your work. ill....very good
- Haya on 'Creating Unique Shapes Using Actionscript'.
- Erik Olson on 'Creating Unique Shapes Using Actionscript'.
- Rainbow on 'Resizing rounded rectangles in Photoshop'.
Subscribe to Comments RSS