TRANSPARENT BACKGROUND IN PNG WITH GIMP

Posts

Pages: 1
I want to improve a gamepage by making the background of some images transparent.

Here is a typical image where the cyan color must become transparent:

I use Gimp 2.8.18 and do the following:
Select Layer > Transparency > Color to Alpha... --> set color to "00FFFF"

The cyan becomes transparent but other colors of the picture get altered.

Do you know a way to turn the background transparent and preserve the other colors?


Is this the way you want it or is it the way you have it?
kory_toombs
Live we shall, through moments both fleeting and eternal.
13356

Select by color, there's a tool for it.

Edit: Once the color is selected simply cut it.
It will take a couple seconds.
author=Irog
I want to improve a gamepage by making the background of some images transparent.

Here is a typical image where the cyan color must become transparent:

I use Gimp 2.8.18 and do the following:
Select Layer > Transparency > Color to Alpha... --> set color to "00FFFF"

The cyan becomes transparent but other colors of the picture get altered.

Do you know a way to turn the background transparent and preserve the other colors?


Create a new layer, copy and paste the image on top of the new layer, delete the old layer, then use the eraser tool to get rid of the cyan.

Alternatively, you could just color the Cyan to white, or whatever the color of your gamepage is, and it should fit in just as well.
@ Deacon Batista
It works perfectly! How did you do it?

@kory_toombs
I did the following:
Tools > Selection Tools > By Color Select --> click in a cyan region
Ctrl-x
The cyan turned into white but it isn't transparent.

In the "Export Image as PNG" option box, the "Save color values from transparent pixels" option isn't selectable.

@Pancaek
When I follow your instructions, I get the cyan turned into black (not transparent) and in the "Export Image as PNG" option box, the "Save color values from transparent pixels" option isn't selectable.
author=Irog
@ Deacon Batista
It works perfectly! How did you do it?

1. I selected the blue-red-green icon with that finger (in the tool box)
2. I left clicked on the color I wanted to become transparent
3. I clicked "Color"-->"Color to transparency" (5th option from the bottom) and clicked "OK"
4. I pressed the "Remove"(?) key on my keyboard (the one next to the "print" key, on its right side).
5. I clicked on "File"-->"export as..." (8th option from the bottom, the one with Alt+Ctrl+E) and exported it as .PNG
Great ! Tanks a lot !

In step 3, my version of Gimp has "Color to Alpha" and if I then set the color to 00ffff I don't need step 4 (I couldn't do step 4 because my "?" key didn't do the remove action).
I didn't mean the "?"-key, but the "remove"-key (or whatever it is called on English keyboards ... maybe "delete" or "erase", don't know) ... -__- The one above the "backspace"-key.

kory_toombs
Live we shall, through moments both fleeting and eternal.
13356

It became white for you because your file has a white background.
(You probably made this mistake when you were first creating the image?)
I just copied your image (which had no data behind it) and pasted as a new image.
(My Gimp didn't know it had a white background. It just auto reverted to transparent.)

ie. Try copying your image from this thread and doing it.
The image was created using Paint so the background was probably the default white. Using the clipboard might do the job.

In the mean time, Deacon Batista's instructions worked. Here is the result.
kory_toombs
Live we shall, through moments both fleeting and eternal.
13356

That looks pretty sexy. I should try that game out sometime.
Thanks! Feel free to share your thoughts on the game.
This looks like something I'd really like (simple clear graphics! ranged attacks with actual ranges!), so I extracted and double-clicked it. Windows didn't want to run it, but I told it to anyway, then Avast popped up to analyze it, and declared that it was a "really rare file" and then sent it off to their labs where they're going to spend the next three hours examining it.

Hopefully by tomorrow I'll be allowed to play it.
kory_toombs
Live we shall, through moments both fleeting and eternal.
13356

@Kalin, it's run in C language, which is sort of rare for programs today, since other languages have taken over such as C++, C#, and objective C.
@Kalin
Thanks for your interest in MinST. I think your comment would fit best on the gamepage where other Avast users can read it.

@kory_toombs
I wonder if compiling C code with a C++ compiler would give a "really rare file" as well.
Pages: 1