Intermediate Photopea Tutorial

Add and Remove a Background

Intermediate Tutorial #2

What is Considered a Background?

In image editing, the background refers to the area behind the main subject of a photo. It provides context, depth, and atmosphere to an image but is often altered or removed to enhance the subject's focus. A background can be a simple solid color, a detailed landscape, or a textured pattern. The type of background can significantly impact the overall composition and mood of an image.

A background is not always static, what is considered a background in one image may be the main subject in another. For example, a scenic beach might be the focus in a landscape photo but serve as the background when highlighting a person in a portrait. Understanding the role of a background allows editors to decide when and how to remove background elements to create a stronger composition.

Altering a background can dramatically change an image's purpose. A product photographer may remove background distractions to create a clean, professional look for e-commerce. A digital artist may replace a dull sky with a vibrant sunset to add drama to a scene. The ability to remove background elements effectively is a crucial skill in photo editing, offering unlimited creative possibilities.

The complexity of a background also affects how it is removed or replaced. A simple white backdrop is easy to remove, while a busy background with intricate details requires more advanced selection tools like Magic Cut. Learning to recognize different background types helps editors choose the best tools and techniques to remove background elements and seamlessly integrate new ones.

Background Removal in Photopea

Removing a background is a fundamental skill in photo editing. Whether the goal is to isolate a subject, replace the background with a new scene, or create a transparent image, Photopea provides multiple tools to remove background elements effectively. The two most common are Magic Cut and Removebg located as options in the select menu. The choice of tool depends on the complexity of the background and the level of precision needed.

The free Magic Cut tool is a powerful method for semi-automatic and manual background removal in Photopea. It will analyze and attempt to detect edges and then automatically draw, but isn't accurate with complex compositions. It requires drawing around the image and learning the Green, Gray and Red colors for more precise selections.

If not blocking advertisements and pop-ups is acceptable then the Removebg tool is the most powerful and automatic background removal tool in Photopea. It analyzes the image, detects edges, and separates the subject from the background with minimal effort. For images with clear contrast between the subject and background, Removebg provides quick and accurate results. A monthly subscription or watching a quick ad is required for use of this tool.

What is a Background Artifact?

A background artifact refers to unwanted remnants of the original background that were not completely removed during the selection process. These can appear as small patches of color, blurred edges, or areas where the background still faintly blends with the subject. Artifacts are more common in images where the background has similar tones or textures to the subject, making it harder for automatic tools to distinguish between them.

While Magic Cut and Removebg are the primary tools, Photopea also includes other background removal options. The Lasso tool allows for manual selection of areas to remove background details precisely. The Erase tool is useful for cleaning up leftover edges after an initial background removal.

The Erase tool allows users to manually remove remaining background elements after an automatic selection. It works by painting over unwanted areas to erase them permanently. The tool's brush settings, such as size, hardness, and opacity, can be adjusted to control the precision of the erasure. A soft-edged brush helps blend edges naturally, while a hard-edged brush is better for removing sharp, defined areas.

Since the Erase tool permanently deletes pixels, it is best used sparingly. When making fine adjustments, using a layer mask instead of direct erasure provides more flexibility. A layer mask allows users to hide or reveal parts of an image without permanently altering the original pixels. We discuss layer masks in detail in our Advanced Photopea tutorials.

What is Magic Cut?

A side by side example of a magic cut tool.

Magic Cut is an advanced selection tool in Photopea designed to remove background elements quickly by automatically detecting the subject. It analyzes color, contrast, and edges to create an accurate selection. Unlike basic selection tools, Magic Cut allows for manual refinement using color-coded selections, making it a powerful tool for removing backgrounds while maintaining control over the final result.

Magic Cut is smart enough to detect what areas need to be removed with minimal input. In many cases, it is not necessary to fully draw over an area. A single click with a 26px brush is often enough to mark an area for removal. However, using a brush that is too large may cause undesired parts of the image to be selected. Adjusting the brush size carefully ensures precise background removal. Magic Cut is not perfect. It may detect areas initially for removal.

How Do I Use the Magic Cut Tool?

  1. Open Magic Cut
    • Open an image in Photopea.
    • Go to Select in the menu bar and choose Magic Cut.
  2. Understanding Magic Cut's Interface
    • The left side displays the original image.
    • The right side shows the preview of the background removal.
    • The toolbar provides different tools to refine the selection manually.
  3. Using Color-Coded Selections
    • Green Brush: Marks areas to keep in the final selection. Use this to refine missing subject areas.
    • Red Brush: Marks areas to remove from the selection. Use this to refine parts of the background that were not removed properly.
    • Gray Brush: This is used to erase green or red marks when adjustments are needed. If green and red markings touch, the tool may misinterpret the selection and an error message will be received. Use the gray brush to separate overlapping areas and ensure a more accurate selection.
  4. Adjusting Brush Size for Precision
    • The Brush Size slider controls the precision of selections. A larger brush affects a broader area, even extending to pixels that are not directly touched. A smaller brush provides more control for working on fine details or intricate edges.
  5. Limitations of Magic Cut for Straight Lines
    • Unlike some selection tools, Magic Cut does not have a built-in way to create straight lines by holding down the Shift key or using other shortcuts. This means that when using a mouse, precise selections require steady hand movement. For best results, work with a smaller brush size when selecting along straight edges and zoom in on the image to improve accuracy.
  6. Setting the Background Display Option
    • Magic Cut allows users to preview the selection with three different background options: Transparent, White, or Black. This setting does not change the final output but helps visualize how the selection will look against different backgrounds. Choosing the right preview setting can help identify missed areas that need further refinement.
  7. Choosing the Selection Output
    • Raster Mask: Keeps the original image intact with a mask applied. This allows for non-destructive editing, meaning the background can be restored if needed.
    • New Layer: Creates a separate cutout of the subject on a new layer while discarding the background permanently.
  8. Finalizing the Selection
    • Click OK once satisfied with the selection.
    • If necessary, refine the edges further using the Eraser tool or adjustment layers.

What is RemoveBG?

RemoveBG is an automatic background removal tool in Photopea that instantly removes the background without the need for manual selection. Unlike Magic Cut, RemoveBG does not require users to mark areas with a brush. Instead, it uses artificial intelligence to detect and separate the subject from the background in a single click.

While RemoveBG can be a useful tool for quick background removal, it is a premium feature that requires a monthly subscription or watching a quick advertisement which will require any ad blockers to be disabled. Users who need more control over their selection or want to refine their results without paying for a subscription may prefer using Magic Cut instead.

Magic Cut requires some practice to master. Since it does not provide a way to make perfectly straight selections, users may need to adjust their technique when using a mouse. Ensuring that green and red selections do not overlap, adjusting brush size carefully, and using the gray brush when needed will result in more accurate background removal.

Online Background Removal Tools

In addition to Photopea's built-in tools, several free online background removal services offer quick and automated ways to remove background elements from an image. These tools use artificial intelligence to analyze the subject and separate it from the background without requiring manual selections. While convenient, free background removal tools often have limitations such as resolution restrictions or watermarking.

Free Online Background Removal Tools

Here are some free background removal tools that do not require a paid subscription:

These tools can be useful for quick background removal tasks, but they may not always provide high accuracy. Since they rely entirely on AI, manual refinements are often needed. Users who require full control over their edits may still prefer using Magic Cut and other selection tools in Photopea.

How to Add a Background to a Photo

After using Magic Cut to remove background elements, the next step is to learn how to add a background to a photo that complements the subject. Whether replacing a plain backdrop with a scenic landscape, a solid color, or a custom design, adding a background in Photopea is a straightforward process.

  1. Open or Import the Background
    • If using an image as the background, open it in Photopea.
    • If the background is part of another file, go to File > Open & Place to insert it into the current project.
    • If using a solid color, create a new layer, select the Paint Bucket tool, and fill the layer with the chosen color.
  2. Position the Background Correctly
    • Ensure the background layer is below the subject layer in the Layers panel by clicking and holding the mouse button down on the layer. While holding the mouse button, drag it below the other layer.
  3. Resize and Adjust the Background
    • To resize the background, use Alt + Ctrl + T (Windows) or Option + Cmd + T (Mac). This opens the Free Transform tool in Photopea.
    • Another way to resize is by selecting the Move tool and checking the Transform Controls box. The bounding box will appear, allowing adjustments. Click and hold the corner handles, then drag them to resize while maintaining the correct proportions.
  4. Match the Subject and Background Dimensions
    • If the background does not match the subject's proportions, adjust its scale using the Transform tool while keeping its aspect ratio intact.
    • Avoid stretching or distorting the background, as this may make the final image look unnatural.
  5. Refine the Subject's Placement
    • If the subject appears misplaced, adjust its size and position using the Move tool.
    • Keep in mind the composition rules, such as centering the subject or positioning it according to the Rule of Thirds. If you are unfamiliar with the Rule of Thirds, refer to our Rule of Thirds tutorial in the Basics of Photo Editing for a deeper understanding of how to use it effectively

Understanding how to add a background to a photo is essential for creating visually appealing compositions. Adding a background is the foundation of image compositing. However, making the subject look natural within the new background requires blending adjustments, which will be covered in the next section.

Blending the Subject with the Background

After adding a background to a photo, the next step is to blend the subject naturally. If the subject looks out of place, the composition will appear artificial. Proper blending ensures that lighting, shadows, colors, and edges match, making the final image look seamless.

  1. Adjust Brightness and Contrast
    • If the subject is too bright or too dark compared to the background, use the Brightness/Contrast adjustment layer to correct the exposure.
    • Go to Layer > New Adjustment Layer > Brightness/Contrast, then adjust the sliders until the subject blends with the lighting of the background.
  2. Match Colors Between the Subject and Background
    • Use the Hue/Saturation adjustment layer to shift the subject's colors to better match the background.
    • If the background has a warm tone (reds and yellows), slightly increase the warmth of the subject's colors for a more natural blend.
    • To create a more unified look, apply a Color Balance adjustment to fine-tune shadows, midtones, and highlights.
  3. Soften the Edges of the Subject
    • Hard edges can make the subject look like it was cut out and pasted onto the background. To create a softer transition, use a layer mask with a soft brush to blend the subject's edges.
    • Reduce the hardness of the brush and gently paint along the edges on the mask to smooth the transition between the subject and the background.
    • We discuss layer masks in detail in our Advanced Photopea tutorials.
  4. Create Shadows for Depth
    • Without shadows, the subject may appear as if it is floating above the background. To add realism, create a shadow beneath or behind the subject.
    • Create a new layer by going to Layer > New Layer. Name the layer โ€œShadowโ€ and ensure it is placed below the subject layer.
    • Select the Brush Tool from the toolbar, then choose a soft black brush by adjusting the hardness to 0%.
    • Lower the brush opacity to around 30-50% and paint a shadow where it appears the opposite of the brightest light or the same side where other shadows may be on other objects within the image or composition.
    • Reduce the opacity of the shadow layer in the Layers panel if the shadow appears too dark.
  5. Apply a Blur for Depth and Edge Blending
    • If the background is blurred while the subject remains sharp, it may look unnatural. Apply a slight blur to the subject to match the depth of field of the background.
    • Select the subject layer and go to Filter > Blur > Gaussian Blur. Adjust the radius until the subject appears naturally integrated.
    • To soften only the edges, select the Blur Tool from the toolbar, set it to a low strength (10-20%), and gently paint along the subject's edges. Holding the Shift key while dragging the tool allows for straight-line blurring.

Blending a subject into a background requires attention to detail. By making small adjustments to brightness, contrast, color, edges, and shadows, the subject will look like it naturally belongs in the scene.

About the author

Tutorial author Wayne Leiser smiling and looking away from the camera

Wayne Leiser has created free and accessible photo editing tutorials. Drawing on over 25 years of design and IT experience, his lessons begin with the universal basics, progressing through beginner, intermediate, and advanced skill levels using Photopea, a free online Photoshop clone. His goal is to provide users with practical skills for financial independence, with a focus on making money online through the SoloBoss profit sharing video platform.