Free COVID at-home test kits The cost of flying internationally Spider-Man: Across the Spider-Verse trailer Omicron vs. delta Walmart PS5 and Xbox Series X restock Cyber Week deals

Pixel 6 just solved the photobomber problem, and it really is magic

With the Magic Eraser feature, you'll never have to worry about a random person in the background ruining a picture again.

Google's Pixel 6 Pro smartphone

The Magic Eraser feature on Google's Pixel 6 Pro smartphone.

Google/Stephen Shankland/CNET

If you've ever had a photo spoiled by a bystander zooming into the frame right as you pressed the shutter, Google's new Pixel 6 and Pixel 6 Pro phones have a way to help you salvage those treasured memories. It's called Magic Eraser.

Google introduced the new Magic Eraser photo-editing tool alongside the Pixel 6 and Pixel 6 Pro at the company's most recent Pixel phone launch event in October. The Magic Eraser tool gives you the power to remove unwanted items or people pulling focus from both new and old photos without compromising the background with a blur effect. The feature detects distractions in your photos, makes suggestions as to what you may want to remove and lets you choose to erase them either all at once or one at a time, with a simple tap, according to a blog post from Google. Machine learning then predicts what the pixels should look like after you remove the unwanted elements from your photos.

Now playing: Watch this: Review: The $599 Google Pixel 6 is everything I wanted
11:57

When you're trying to get that perfect image for Instagram, the rest of the world won't always notice you're taking a photo and could unintentionally end up in the background. The Magic Eraser feature should save you from awkwardly asking someone to move out of frame while giving you more control over what shows up in your pictures.

In addition to Magic Eraser, the Pixel 6 series also got new camera hardware and features like Real Tone and Motion mode. The tech giant also announced a Pixel Pass bundle deal, the Android 12 OS and Google's in-house Tensor chip.

Magic Eraser is only available on the new Pixel 6 and Pixel 6 Pro for now, but here's how to find it.

How to use Magic Eraser on your Pixel 6

1. Open the Google Photos app. 

2. Choose the photo you want.

3. Tap Edit in the bottom toolbar.

4. Tap Magic Eraser. The tool will detect and outline potential distractions in white.

5. If you agree with the suggestions, tap Erase All or tap each item to remove them individually.

If Magic Eraser didn't correctly choose what you want to remove, you can manually circle something in the photo to erase it. 

The Google Pixel 6 ($599) and the Pixel 6 Pro ($899) are available now.

For more information, check out what the Pixel 6 Pro could mean for Apple and Samsung and why the Pixel 6 is a major upgrade for phones.