Extending the Frame of a Photo

Facebooktwitterlinkedin

Today’s Question: You recently addressed cropping to fit a standard print size. But how do you deal with a situation where the image isn’t long enough on one side and you can’t crop further? Is there an easy way to extend the image to fit the intended crop size?

Tim’s Quick Answer: Yes, you can extend the frame of a photo relatively easily in many cases using a helpful technique in Photoshop. This involves duplicating and flipping an area near the edge of the frame, to provide a good match for pixels for extending the size of the image.

More Detail: As long as the edge of the image you want to extend doesn’t contain too many objects that would stand out if they were duplicated, you can use a very simple technique in Photoshop to extend the frame of an image.

Start by using the Rectangular Marquee tool to select an area on the side of the image that needs to be extended. For example, if you want to extend the left side of the image you would select an area on the left side of the frame that covers the entire height of the image. Make sure the selection is at least as big as the extension you need to create. When in doubt, make the selection larger than you need, as you can always crop the image later.

With the selection active, make sure the applicable image layer is selected on the Layers panel, which you can do by clicking on the thumbnail for that layer. In many cases, for example, that would probably be the Background image layer.

Now you can duplicate the selected pixels by going to the menu and choosing Layer > New > Layer via Copy. Because a selection is active, only those selected pixels will be duplicated to the new layer.

To get a (relatively) seamless match between the existing image and the new image layer, you want the pixels from the outer edge on both layers to align with each other. Since the new layer is going to be moved outward to provide an extension of the image, that means the layer needs to be flipped. In this case the image is being extended horizontally, so from the menu you can choose Edit > Transform > Flip Horizontal. If you are extending the image vertically you would choose Flip Vertical from that menu.

You can then select the Move tool and drag the new layer outward until the edges of the image match. In this example that means dragging the new layer to the left until the right edge of the new layer aligns with the left layer of the image, with the top and bottom edges lined up as well. At this point, of course, you won’t be able to see the new layer when it is dragged out of the existing image area.

After dragging the new layer into position, you can reveal all the hidden pixels by choosing Image > Reveal All from the menu. At this point you can obviously crop the image to get it back down to the specific output size you needed, if applicable.

You could certainly use other techniques, such as first extending the canvas with the Image > Canvas Size command. You could then create a selection of the added area and use the Edit > Content-Aware Fill command to fill in the new empty pixel area in an intelligent way.

However, I find that in most cases duplicating pixels in the image as outlined above provides at least a great starting point. You can then use image cleanup tools as needed to clean up any obvious areas of duplication or odd shapes that resulted from the duplicated and flipped pixels.