Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Design

Maximiliane Quel
PLUS
Maximiliane Quel
Courses Plus Student 55,489 Points

most efficient way to change the background of img photographed on white background

I would like to seamlessly integrate an object that has originally been photographed against a white background such as in this image:

cans on white background

ideally I want the object and it's shadow to appear as if they had been photographed on a different coloured background to start with, such as for example a bright red.

masking the image out in photoshop will still take me a considerable amount of time if I want to keep the detail. particularly since there is hair and fuzzy edges. and of course I don't have just one image that I need to treat this way.

so before I start that process I am wondering whether I am overlooking a simple more efficient solution.

any suggestions. opinions and battle stories welcome.

5 Answers

Really the only perfect way to remove a background is if you have a PSD file where something like that was placed on a white background layer. Vector formats are another way to get the background you'd like. In the image you're referring to, it has shadows and little details along the twine that will make it tougher. It would take some work to get it perfect and it might not really look that great (at least not without a fair amount of effort) unless you're pretty good at PS compositions and removing backgrounds.

The magic wand tool is a decent start, but you'd then have to think about shadows, adding your own, etc., all to get it looking more realistic.

You might also notice that the magic wand tool didn't do a perfect job and you'd have to reselect some of the can with the lasso tool. Another possible way is this method (not so great with this image) but there is more than one way to go about it.

Removing a White Background in Photoshop

Ricardo Diaz
Ricardo Diaz
30,415 Points

I would just use a magic wand and then select the background. It takes time but that process makes the size of the image smaller and also it looks better. I've always noticed that one white background might not 100% match another white background correctly.

Maximiliane Quel
PLUS
Maximiliane Quel
Courses Plus Student 55,489 Points

thanks for your answers! unfortunately I wasn't provided with psd files ...

as you say the crux is really to make it look as natural as possible without spending days on it. I think I am most tempted to just mask out without the shadow and mock that back in later. adding back into the selection is not an issue and even working on the cord is manageable. but I'd be lying if I said I am looking forward to adding the shadow back in. I also have experience with one approach really and I'm not sure it is the best one. I would have used quick selection and then refined the edges.

I'm going to have an in depth look at the link that you provided. maybe it will help me with the other images.

I think what I am trying to avoid is running off blindly. so I guess I really want to hear what other people think and how they would approach it. what experience you've made and a best practice really.

is using channels my best option?

This image in vector format would be much easier unless you're needing a real-life image.

Maximiliane Quel
PLUS
Maximiliane Quel
Courses Plus Student 55,489 Points

tempting. yes that would be a great solution. I will however have to use the images provided.

hopefully it won't go so horribly wrong that I need a fallback solution. ;0)