RSS/Atom feed Twitter
Site is read-only, email is disabled

Making an image with a white background transparent?

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

16 of 16 messages available
Toggle history

Please log in to manage your subscriptions.

Making an image with a white background transparent? dreadnought 09 May 00:37
  Making an image with a white background transparent? Harish Narayanan 09 May 01:06
   Making an image with a white background transparent? dreadnought 09 May 21:57
    Making an image with a white background transparent? dreadnought 09 May 22:05
     Making an image with a white background transparent? Harish Narayanan 09 May 23:08
     Making an image with a white background transparent? Sven Neumann 10 May 13:17
      Making an image with a white background transparent? Dave Neary 10 May 15:51
    Making an image with a white background transparent? Marco Wessel 09 May 22:15
     Making an image with a white background transparent? dreadnought 09 May 23:22
   Making an image with a white background transparent? dreadnought 09 Jun 00:41
    Making an image with a white background transparent? Thong Nguyen 09 Jun 02:56
    Making an image with a white background transparent? Egon Brinken 09 Jun 16:47
    Making an image with a white background transparent? Steve Stavropoulos 10 Jun 06:15
     Making an image with a white background transparent? dreadnought 11 Jun 18:05
      Making an image with a white background transparent? Tom Williams 11 Jun 18:37
      Making an image with a white background transparent? Carol Spears 11 Jun 18:47
dreadnought
2004-05-09 00:37:31 UTC (almost 20 years ago)

Making an image with a white background transparent?

I have a logo with a white background that I would like to make transparent .. At least the white background anyway. I'm not a graphics guru, and I just began using Gimp. Is there a resource geared for newbies on how to do this?

Thanks!

Harish Narayanan
2004-05-09 01:06:53 UTC (almost 20 years ago)

Making an image with a white background transparent?

dreadnought wrote:

Is there a resource geared for newbies on how to do this?

Sure, here you go:

http://gimp.org/tutorials/Changing_Background_Color_1/ (And you obviously wouldn't need to do step 5 on that tutorial.)

Harish | http://wahgnube.org

dreadnought
2004-05-09 21:57:59 UTC (almost 20 years ago)

Making an image with a white background transparent?

Hi Harish,

That worked awesome! The transparency looks much better than what one of my coworkers pumped out in Macromedia Fireworks .. I have one problem though, alluded to in the tutorial you mentioned. There's a graphic in the logo I'm working on that was some white in it, which got removed by the Color To Alpha procedure. The tutorial mentions painting underneath the image to replace the white that should be part of the graphic, but doesn't go into how to do this?

Thanks again for the advice,

Mark

-----Original Message----- From: Harish Narayanan [mailto:harish@gamebox.net] Sent: Saturday, May 08, 2004 4:07 PM To: dreadnought
Cc: gimp-user@lists.xcf.berkeley.edu Subject: Re: [Gimp-user] Making an image with a white background transparent?

dreadnought wrote:

Is there a resource geared for newbies on how to do this?

Sure, here you go:

http://gimp.org/tutorials/Changing_Background_Color_1/ (And you obviously wouldn't need to do step 5 on that tutorial.)

Harish | http://wahgnube.org

dreadnought
2004-05-09 22:05:31 UTC (almost 20 years ago)

Making an image with a white background transparent?

Quick update .. I'm trying to use the bucket fill for the area I need to replace the white in. The bucket fill works perfect in the sense that it fills the correct area, but it fills it in red! Both my foreground and background colors are set to white. I don't understand where the red is coming from. I've tried this a bunch of times - no matter what my foreground and background colors are set to, when I click the bucket fill in the area, it gets filled in red.

-----Original Message----- From: gimp-user-bounces@lists.xcf.berkeley.edu [mailto:gimp-user-bounces@lists.xcf.berkeley.edu] On Behalf Of dreadnought Sent: Sunday, May 09, 2004 12:58 PM
To: gimp-user@lists.xcf.berkeley.edu Subject: RE: [Gimp-user] Making an image with a white background transparent?

Hi Harish,

That worked awesome! The transparency looks much better than what one of my coworkers pumped out in Macromedia Fireworks .. I have one problem though, alluded to in the tutorial you mentioned. There's a graphic in the logo I'm working on that was some white in it, which got removed by the Color To Alpha procedure. The tutorial mentions painting underneath the image to replace the white that should be part of the graphic, but doesn't go into how to do this?

Thanks again for the advice,

Mark

-----Original Message----- From: Harish Narayanan [mailto:harish@gamebox.net] Sent: Saturday, May 08, 2004 4:07 PM To: dreadnought
Cc: gimp-user@lists.xcf.berkeley.edu Subject: Re: [Gimp-user] Making an image with a white background transparent?

dreadnought wrote:

Is there a resource geared for newbies on how to do this?

Sure, here you go:

http://gimp.org/tutorials/Changing_Background_Color_1/ (And you obviously wouldn't need to do step 5 on that tutorial.)

Harish | http://wahgnube.org

Marco Wessel
2004-05-09 22:15:03 UTC (almost 20 years ago)

Making an image with a white background transparent?

On Sun, May 09, 2004 at 12:57:59PM -0700, dreadnought wrote:

The tutorial mentions painting underneath the image to replace the white that should be part of the graphic, but doesn't go into how to do this?

You can either select the region you don't want included, invert it, and then apply colour to alpha (thus excluding the white parts of the graphic), or you can create a new layer under the layer with your graphic and paint white into that.

Marco

Harish Narayanan
2004-05-09 23:08:16 UTC (almost 20 years ago)

Making an image with a white background transparent?

dreadnought wrote:

Both my foreground and background colors are set to white. I don't understand where the red is coming from.

I don't either.Open the dialog box with the tool options for bucket fill. (Double click the tool on the main gimp window) and make sure the fill type is FG/BG colour fill. Maybe (for no apparent reason), it's currently set to fill using a red pattern.

Harish | http://wahgnube.org/

dreadnought
2004-05-09 23:22:31 UTC (almost 20 years ago)

Making an image with a white background transparent?

Hi Marco,

Selecting, inverting, then Color To Alpha worked perfectly .. Thanks for your help. I didn't realize how powerful the Gimp was!

Mark

-----Original Message----- From: gimp-user-bounces@lists.xcf.berkeley.edu [mailto:gimp-user-bounces@lists.xcf.berkeley.edu] On Behalf Of Marco Wessel Sent: Sunday, May 09, 2004 1:15 PM
To: gimp-user@lists.xcf.berkeley.edu Subject: Re: [Gimp-user] Making an image with a white background transparent?

On Sun, May 09, 2004 at 12:57:59PM -0700, dreadnought wrote:

The tutorial mentions painting underneath the image to replace the white that should be part of the graphic, but doesn't go into how to do this?

You can either select the region you don't want included, invert it, and then apply colour to alpha (thus excluding the white parts of the graphic), or you can create a new layer under the layer with your graphic and paint white into that.

Marco

Sven Neumann
2004-05-10 13:17:52 UTC (almost 20 years ago)

Making an image with a white background transparent?

Hi,

"dreadnought" writes:

Quick update .. I'm trying to use the bucket fill for the area I need to replace the white in. The bucket fill works perfect in the sense that it fills the correct area, but it fills it in red! Both my foreground and background colors are set to white. I don't understand where the red is coming from. I've tried this a bunch of times - no matter what my foreground and background colors are set to, when I click the bucket fill in the area, it gets filled in red.

You are most probably working in indexed colors mode and red is the closest available color. You should always work in RGB mode.

Sven

Dave Neary
2004-05-10 15:51:14 UTC (almost 20 years ago)

Making an image with a white background transparent?

Hi,

Sven Neumann wrote:

"dreadnought" writes:

Quick update .. I'm trying to use the bucket fill for the area I need to replace the white in. The bucket fill works perfect in the sense that it fills the correct area, but it fills it in red!

You are most probably working in indexed colors mode and red is the closest available color. You should always work in RGB mode.

Either that or yuou have turned off the green and blue channels by accident. If you *are* in RGB mode, you should check in the channels dock that all colour channels are selected.

Cheers, Dave.

dreadnought
2004-06-09 00:41:50 UTC (almost 20 years ago)

Making an image with a white background transparent?

Hello,

I've been using the technique mentioned in the email below to try to get images with white backgrounds transparent .. I've had some good luck, but also some bad. Today I used the process on two .jpg's and the *entire* images ended up transparent. In one of the images, the foreground color is actually black. I've got the color picker on white and then do a color to alpha on white. The entire image (including the black stuff in the middle) gets the alternating boxes indicative of transparency.

Any ideas? This is one of the images I'm trying to make transparent:

http://www.pelican.com/imatges/3cases_1620.jpg

As far as I can tell, as a gimp newbie, this should be an easy target for color to alpha to make transparent, since the object is solid black. I figured the white would quickly turn transparent and that's it, but I've tried a bunch of times and the whole thing does. Maybe this is a bug w/ 2.0 on Win32?

Thanks for the advice!

-----Original Message----- From: Harish Narayanan [mailto:harish@gamebox.net] Sent: Saturday, May 08, 2004 4:07 PM To: dreadnought
Cc: gimp-user@lists.xcf.berkeley.edu Subject: Re: [Gimp-user] Making an image with a white background transparent?

dreadnought wrote:

Is there a resource geared for newbies on how to do this?

Sure, here you go:

http://gimp.org/tutorials/Changing_Background_Color_1/ (And you obviously wouldn't need to do step 5 on that tutorial.)

Harish | http://wahgnube.org

Thong Nguyen
2004-06-09 02:56:16 UTC (almost 20 years ago)

Making an image with a white background transparent?

On Tue, 8 Jun 2004, dreadnought wrote:

I've been using the technique mentioned in the email below to try to get images with white backgrounds transparent .. I've had some good luck, but also some bad. Today I used the process on two .jpg's and the *entire* images ended up transparent. In one of the images, the foreground color is actually black. I've got the color picker on white and then do a color to alpha on white. The entire image (including the black stuff in the middle) gets the alternating boxes indicative of transparency.

I tried this on the image from the link you gave, wich looked at a black case on wheels, and the color to alpha filter did as you said. The image turned semi-transparent too.

You could add an alpha channel to the jpeg image then add a layer mask to the image. Select the white background with the select by color tool. Select the layer mask in the layer dialog by clicking on the layer mask and fill the selection with black. You'll need to do this several times by adjusting the threshold of the select by color tool until you get want you want.

Hopes that help, Thong

Egon Brinken
2004-06-09 16:47:20 UTC (almost 20 years ago)

Making an image with a white background transparent?

onsdag 9. juni 2004, 00:41, dreadnought wrote:

Hello,

I've been using the technique mentioned in the email below to try to get images with white backgrounds transparent .. I've had some good luck, but also some bad. Today I used the process on two .jpg's and the *entire* images ended up transparent. In one of the images, the foreground color is actually black. I've got the color picker on white and then do a color to alpha on white. The entire image (including the black stuff in the middle) gets the alternating boxes indicative of transparency.

Any ideas? This is one of the images I'm trying to make transparent:

http://www.pelican.com/imatges/3cases_1620.jpg

Firstly: make an new, same size and choose transparent background. Then, at the original picture: "choose" -> "after colour" (Shift-O) and click on background. Then "choose" -> "invert" (Ctrl-I). Copy (Ctrl-C) and in the new, empty picture: paste (Ctrl-V)

Works perfectly.

Oivind H

Steve Stavropoulos
2004-06-10 06:15:57 UTC (almost 20 years ago)

Making an image with a white background transparent?

On Tue, 8 Jun 2004, dreadnought wrote:

I've been using the technique mentioned in the email below to try to get images with white backgrounds transparent .. I've had some good luck, but also some bad. Today I used the process on two .jpg's and the *entire* images ended up transparent. In one of the images, the foreground color is actually black. I've got the color picker on white and then do a color to alpha on white. The entire image (including the black stuff in the middle) gets the alternating boxes indicative of transparency.

This behaviour is the expected. Color to alpha removes the selected color from all the colors in the image in such a way that when you put the image above a background of that color you will get your original image. To do what you want, and that is to just erase a specific color, you should:
1) add an alpha channel to your layer if it hasn't got any yet (right click on the layer and "add alpha channel") 2) Select -> Select by Color
3) Edit -> Clear

dreadnought
2004-06-11 18:05:10 UTC (almost 20 years ago)

Making an image with a white background transparent?

Hi Steve,

Thanks for the reply! I've been trying all the suggestions I've been getting through this mailing list, and still have not been able to get the background of my test image transparent. Here's the link again for the image I'm working on:

http://www.pelican.com/imatges/3cases_1620.jpg

I went through all the Gimp options after right-clicking on the image, and do not see any "add alpha channel" .. I've been browsing FAQ's on the net regarding the Gimp, and have seen that images that are not in RGB can be problematic. Just for kicks, I went and tried to change mode to "RGB", but "RGB" is greyed out for this image.

Any thoughts?

Thanks!

Mark

-----Original Message----- From: Steve Stavropoulos [mailto:steve@math.upatras.gr] Sent: Wednesday, June 09, 2004 9:16 PM To: dreadnought
Cc: gimp-user@lists.xcf.berkeley.edu Subject: RE: [Gimp-user] Making an image with a white background transparent?

On Tue, 8 Jun 2004, dreadnought wrote:

I've been using the technique mentioned in the email below to try to get images with white backgrounds transparent .. I've had some good luck, but also some bad. Today I used the process on two .jpg's and the *entire* images ended up transparent. In one of the images, the foreground color is actually black. I've got the color picker on white and then do a color to alpha on white. The entire image (including the black stuff in the middle) gets the alternating boxes

indicative of transparency.

This behaviour is the expected. Color to alpha removes the selected color from all the colors in the image in such a way that when you put the image above a background of that color you will get your original image. To do what you want, and that is to just erase a specific color, you should:
1) add an alpha channel to your layer if it hasn't got any yet (right click on the layer and "add alpha channel") 2) Select -> Select by Color
3) Edit -> Clear

Tom Williams
2004-06-11 18:37:42 UTC (almost 20 years ago)

Making an image with a white background transparent?

I was able to make the white background transparent following this procedure using Gimp 2.0.1 on Linux. This procedure should be platform independent and possibly release independent:

1) Open the image 2) On the "Layers" dialog, create a new transparent layer 3) Click on the "Background" layer so the original image is selected 4) Use the "Select By Color" tool to select the white (Right click on the image, click on "Select" then on "By color" and choose the white background with the mouse pointer)
5) Right click on the image and click "Select" then "Grow" and grow the selection by 1 pixel
6) Invert the selection by right-clicking on the image and "Select" then "Invert"
7) Then copy the selection by right clicking on the image then "Edit" then "Copy"
8) On the layers dialog, select the transparent layer so it is the currrent/active layer
9) Right click on the image and click "Edit" then "Paste" 10) Click the "Anchor" button on the layers dialog to anchor the image you just pasted
11) Click the "eye" icon to the left of the original image layer with the "Background" name and the white background should disappear

This process can be simplified using layer masks:

1) Open the image 2) On the Layers dialog, right click on the "Background" layer and click "Add Alpha Channel"
3) Right click on the image and click "Select" then "By color" 4) Right click on the image and click "Select" then "Grow" and grow the selection by 1 pixel
5) Choose the white background with the mouse pointer 6) On the Layers dialog, right-click on the Background layer and click "Add Layer Mask" Select the White (Full Opacity) mask option 7) Right click on the image and click "Edit" "Fill with FG color" and the white background should disappear 8) On the Layers dialog, right click on the Background layer and click "Apply Layer Mask"
9) At this point, you must decide if you want to save as GIF or PNG since JPEG does not support transparency and save the image. Be sure to use Save As to save the image so you won't clobber the orignal.

I'm sure others can fine tune this procedure as well but I just did it and the image does have a transparent background.

Hope this helps! :)

Peace....

Tom

dreadnought wrote:

Hi Steve,

Thanks for the reply! I've been trying all the suggestions I've been getting through this mailing list, and still have not been able to get the background of my test image transparent. Here's the link again for the image I'm working on:

http://www.pelican.com/imatges/3cases_1620.jpg

I went through all the Gimp options after right-clicking on the image, and do not see any "add alpha channel" .. I've been browsing FAQ's on the net regarding the Gimp, and have seen that images that are not in RGB can be problematic. Just for kicks, I went and tried to change mode to "RGB", but "RGB" is greyed out for this image.

Any thoughts?

Thanks!

Mark

-----Original Message----- From: Steve Stavropoulos [mailto:steve@math.upatras.gr] Sent: Wednesday, June 09, 2004 9:16 PM To: dreadnought
Cc: gimp-user@lists.xcf.berkeley.edu Subject: RE: [Gimp-user] Making an image with a white background transparent?

On Tue, 8 Jun 2004, dreadnought wrote:

I've been using the technique mentioned in the email below to try to get images with white backgrounds transparent .. I've had some good luck, but also some bad. Today I used the process on two .jpg's and the *entire* images ended up transparent. In one of the images, the foreground color is actually black. I've got the color picker on white and then do a color to alpha on white. The entire image (including the black stuff in the middle) gets the alternating boxes

indicative of transparency.

This behaviour is the expected. Color to alpha removes the selected color from all the colors in the image in such a way that when you put the image above a background of that color you will get your original image. To do what you want, and that is to just erase a specific color, you should:
1) add an alpha channel to your layer if it hasn't got any yet (right click on the layer and "add alpha channel") 2) Select -> Select by Color
3) Edit -> Clear

Carol Spears
2004-06-11 18:47:19 UTC (almost 20 years ago)

Making an image with a white background transparent?

On Fri, Jun 11, 2004 at 09:05:10AM -0700, dreadnought wrote:

Thanks for the reply! I've been trying all the suggestions I've been getting through this mailing list, and still have not been able to get the background of my test image transparent. Here's the link again for the image I'm working on:

http://www.pelican.com/imatges/3cases_1620.jpg

I went through all the Gimp options after right-clicking on the image, and do not see any "add alpha channel" .. I've been browsing FAQ's on the net regarding the Gimp, and have seen that images that are not in RGB can be problematic. Just for kicks, I went and tried to change mode to "RGB", but "RGB" is greyed out for this image.

well, RGB might be greyed out because you are trying to convert the converted. meaning it already is rgb.

making transparent jpegs is impossible due to the format of jpegs, if this is what you are trying to do.

formats that handle transparency include (but are not limited to) png, gif, and xpm. i dont know if this is addressing your particular problem or not.

to add alpha to a background layer (the only gimp layer that does not come with an alpha layer) is to right click on the image and choose Layers -->Transparency -->Add Alpha. Or you can right click to the right of the layer icon in the Layers Dialog (Dialogs -->Layers) and select "Add Transparency". sorry the documentation was not there. the gimp has been doing this layers and transparency thing for a long time. some of the lack of documentation is from the fact it is used so much. similar to the lack of documentation on how to breathe out there.

enjoy working with the gimp. and do spend some time looking through and trying the various menu options available to you. the gimp has much to offer, more than you can imagine without checking it out for yourself.

carol