Advertisement

pong paddle

Started by October 29, 2012 03:10 AM
4 comments, last by phil67rpg 11 years, 10 months ago
is there anyway I can change the background of my sprite from white to black. my .jpg is attached.
You can import it into Gimp, color-select the white background, and fill it with black.

My suggestion is that you avoid using JPG for sprites, though. Typically, a sprite is going to have transparent areas, and JPG doesn't support alpha channel. Also, JPG compression is lossy, so you can lose detail. I'd suggest going with PNG, TGA or some other format that supports loss-less compression and a alpha channel.
Advertisement
cool thanks for the advice
yeah that worked thanks
Hello,

Since you have antialised edges on the paddle, simply filling the selection is likely to either produce white lines along the edge or significantly shrink your sprite. The white-edges-case can be seen on the left two examples of the attached image.
Luckily, GIMP comes with a great (preinstalled) plugin called "Colour to Alpha". This will not completely replace the old color, but work gradually, depending on how much of the old color is to be found in each pixel. Here's how to use it:
1. Use the fuzzy select to select the white background.
2. Go to "Select->Grow->1px->OK" to make sure you get all the edges
3. Go to "Colours->Colour to Alpha...->From white->OK"
The result is a transparent background with antialised edges, so that the sprite will blend nicely atop any color as can be seen in the two examples on the right.

bw,
Tobl



[attachment=11982:pongpaddle.png]
Think my post was helpful? Want to thank me? Nothing easier than that: I sure am are a sucker for reputation, so just give it a little keycode 38 if you like. ^^
cool thanks I used gimp and everything is good now.

This topic is closed to new replies.

Advertisement