Extract an object from a pic using GIMP !
August 5, 2008 – 1:39 amPhotoshop is Godlike ! But you don’t question God’s decision. Do you ?
GIMP is the in thing, yeah its a pain in a$$ to shift from norm, but its worth taken. After all you own the software and don’t pay a penny for it. May be munificent should spare some donations to the developer of this cool image editing software
Here I enlist two methods to extract an object (how about you landing on moon ?). First one is easier + surprising and second one is the powerful + more accurate.
Method 1
Use this method when there is contrasting difference between the object you want to extract and the background objects.
Download the sample Image and the .xcf file from HERE
Here I will use this image, I know I’m a fan of Timmy in Shaun the Sheep

To show that there is a white background I have posted it on a colored background
And the Final Image (without white background):

Timmy goes to sleep !
I know its noob of me to remove white which is so easy to do so. But still it serves as a demonstration and not some pro talk.
Here are the steps:
- Open the image in GIMP
- Use
“Fuzzy Select Tool” (U) and then click on the white background. It will select the background.

did you fuzzy select ?
- Now we don’t need the background, there are two possibility. One is to cut the background and other is to cut only Timmy.
- So press “CTRL+I” to invert selection (Now the Timmy will be selected).
- Now press “CTRL+X” to cut Timmy (reminds me of I had to cut myself)

Cut the frikkin Timmy !
- Now add “New Layer“. And remember to select the “Fill Type” as “Transparency“. If the “Layers” window is not opened press “CTRL+L” to open it. To add new layer press the icon at the bottom-left of the “Layers” window.

Yeah don’t forget to check Transparency as Layer Fill Type
- Now focus the “New Layer” by clickin on the layer name in “Layers” window. See in my PC the active layer is in red color. And yeah before that uncheck the eye beside “Background” layer name in “Layer” window. Now press “CTRL+V” to paste Timmy on the new transparent layer named “New Layer”

New Layer is selected (red background) and eye beside Background is gone by clickin on it !
- Now you can save the image in any format :p. Its ready to be used elsewhere.

final image with transparent background !
One problem that may arise is some background pixel that surrounds the object. Like this in the same image (image has been zoomed for fine editing ):

White is where ear is !
So what should I did ? Use
“Blur Tool” (SHIFT+U) to lessen the effect. Though be cautious of blurring everything. Here is the effect. Or if you feel like more dedicated then zoom in and wipe out the white pixels using “Eraser”

Blur can save your toil
Off to method 2 !
Method 2
Here is what you can do with method 2 :p. Tutorial coming soon ! Feeling a bit listless now.
Sample images:



Final Image:














7 Responses to “Extract an object from a pic using GIMP !”
Cool!
By Smallstar on Tue 05th Aug, 2008
You’ve been tagged!
http://smallstar.wordpress.com/2008/08/05/tag-from-hasit/
By Smallstar on Wed 06th Aug, 2008
roger that !

By T on Thu 07th Aug, 2008
By Smallstar on Thu 07th Aug, 2008
Cool tut and blog man
No doubt that this goes in my bookmarks as well as in my feeddemon feeds
By Adithya on Fri 08th Aug, 2008
I love that little sheep too, poor kid gets used like a blackboard duster and what-not!!
By Abhishek on Fri 08th Aug, 2008
@Smallstar

@Aditya
Thanks. I will try to post something interesting for you especially !
@Abhishek
Yeah but he is a diehard sheep
By T on Sat 09th Aug, 2008