Jump to content

  • Log In with Google      Sign In   
  • Create Account

pong paddle


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 28 October 2012 - 09:10 PM

is there anyway I can change the background of my sprite from white to black. my .jpg is attached.

Attached Thumbnails

  • pongpaddleblue.jpg


Sponsor:

#2 JTippetts   Moderators   -  Reputation: 8491

Like
5Likes
Like

Posted 28 October 2012 - 09:25 PM

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.

#3 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 28 October 2012 - 09:31 PM

cool thanks for the advice

#4 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 28 October 2012 - 09:45 PM

yeah that worked thanks

#5 Tobl   Members   -  Reputation: 363

Like
0Likes
Like

Posted 29 October 2012 - 01:24 PM

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



pongpaddle.png

Edited by Tobl, 29 October 2012 - 01:26 PM.

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. ^^

#6 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 29 October 2012 - 02:14 PM

cool thanks I used gimp and everything is good now.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS