Categories

Jun 30, 2015

How to Stretch Images Using Content Aware Scale

Have you ever really needed to extend the background of your image, but not wanted to spend hours with the clone stamp tool? If so, today’s episode is for you! Learn How to Stretch Images Using Content Aware Scale!

Preparation

We start out with a square image that we would like to extend. It is a great example because we want to stretch out the water and sky, but not the person standing in the center. If you have a highly detailed photo that you want to stretch, the content aware scale tool will not be the best option. If it’s simple open space, however, like a sky or the ground, it will most certainly help you out! You can do this both horizontally and vertically. 

Start by extending the canvas behind your image. You can do this by using the crop tool and just widening the background. Hold the edge and drag it to the left or right.

  • TIP: Hold Alt/Opt while doing this to extend out evenly from the center.

Duplicate the background layer by holding Cmd + J. To test out how incorrect the photo will look with the normal transform tool, you can press Cmd + T and stretch the image out to the new width. Yuck!! It will not look good at all. This is where Content Aware Scale comes in!

Content Aware Scale

Go to Edit – Content Aware Scale. Now, you can drag the edges of the images outwards and the most important information will stay intact (human figure and the pier) while the more simple information (sky and water) will be extended to hit the new borders. It creates a much more natural look than the previous example!

Protect Your Important Information!

You might notice that when you used the Content Aware Scale tool, there were parts of your image that were warped or slanted a bit. To truly make sure the items you don’t want to stretch stay protected, it will just take a few extra steps.

  1. Make a selection of the object you would like to “protect.” In this case, it is the man and the pier.
  2. Load this selection as a Channel. To do this go to the Channels tab, and create a new channel. Your objects should still be selected!
  3. You will see a completely black screen with marching ants around your objects. Hold Shift + Delete and select Use – White. Now, your objects will be white on a black background.
  4. Go back to your regular layers tab. Go to Edit – Content Aware Scale, and select your Alpha 1 channel under the Protect drop down menu.
  5. Scale the image just as you did before! The objects you chose to “protect” should not move, and you will have a more successful final image.

As you can see in our example, the before and after images are only different in their cropped size. The goal is to have the end image look completely natural, and not give away the secret that you’ve stretched it out!

  • TIP: Sometimes you just can’t scale as much as you’d like. A helpful hint is to scale it halfway, stop, and then start over and scale it the rest of the way.

19 Comments


user image You
(will not be published)

  • user image
    Christoph

    Great! Have been starving quite long for your next episode…
    Particularly like you discussing the various possible approaches to achieve a result.
    Thanks…
    Chris

  • user image
    Stefan

    For me being a newbie, Photoshop can be totally overwhelming (read scaring)… But looking at your episodes Aaron makes everything easy. Even things that is really hard you show a way to make easy… Doesn’t matter if it is “simple” color changes or “impossible” hair… A 10 minutes episode with your awesome tips makes it possible to approach Photoshop without shaking…. Did I mention I think you’re a totally awesome teacher?? Thanks

  • user image
    Les Cotterill

    I cannot get this to work. I have completed tasks 1-3 but when I go back to my layers I cannot bring up Content Aware Scale. That option is grayed out. Any suggestions. I am using an iMac

    • user image
      groovekonna

      It doesn’t work on background layer, so copy the layer (ctrl-j) and scale on that

  • user image
    charles sweigart

    Another very helpful hint video.
    Thanks Aaron.

    When accessing this on Chrome I now get this note.
    “NPAPI plugins don’t work on Chrome version 42 and higher”

    Thought you might want to address this in the future.

  • user image
    Kyle

    When providing an image for print, we usually submit an image that is 300 dpi. Does the revised stretching recalculate this or does the quality (of 300 dpi) then get stretched over more area whereby generating a lesser quality image?

    • user image
      groovekonna

      The quality suffers when the algorithm tries to invent content for new pixels, but of course the image is still 300 dpi, only wider.

  • user image
    Ron

    Hi Aaron This would be handy to add negative space when it may have been cropped out previously such as space for a person to look into or a bird to fly into etc.

  • user image
    Bernard Paterson

    Always great info in the videos,
    I have access to a wide format Canon imagePROGRAF iPF8400. but not sure about preparing files for print at this size, any chance of doing a tutorial on this some time on getting files ready for print?
    Love the show.

    Bernie

  • user image
    Johan Oltegen

    Could the channel selection protect structures in Photomerge for panoramas?
    I find LR and PS make great pano’s np but gphave challenges to deal epwith foreground structures like in the stretch tutorial.

  • user image
    Aleksandar

    Nice tutorial, but it is easy when you pick an image like this one – simple, with very few details. What to do when you have more complex image, with much details etc. ? Can you give us tut for such picture?

  • user image
    Edwin van der Veer

    Great tutorial!
    Been using all kinds of techniques to achieve the same result, but it’s very cumbersome and involves stretching layers and using gradient maps, to smooth out the transitions. Aaron to the rescue! Thanks 🙂

  • user image
    nuwan

    it’s very nice i have watch your many video and thank for you.i like watch many video lesson of you.i am sri lankan

  • user image
    Henning Hansen HIH Ad.

    This tutorial was just what I was looking for to allow me to create more space around a flower shot or bird shot. Then I would be able to place a second photo of a cut out humming bird, or flower, resize and reposition to make it look like the bird is about to find some nectar.
    The problem besides my lack of experience lies with the changes between PS-5 & PS-6 where the Mask Panel and Layers panel have been changed around.
    NOW! in your current Tutorial I get halfway through using PS-6 and then the protect feature does not correspond to the instructions. I notice you are using CC and I,m afraid there has been changes.
    Could you please see if you could find a solution. I have a flower photo but don’t know how to get it uploaded with the bird.
    Because I create a perfect black background with the bird, making a selection is a breeze, much better than a back drop. I see what I need to do, but can’t get the tutorials to work as shown. I have spent 3 years perfecting the capture of the birds etc and just need to get over this hump.
    Please get back, much appreciated.
    P.S. Perhaps it would help if the tutorials would state which version of Photo Shop is being used? Just like the adjustments needed between a PC and a Mac. Henning