Microsoft Paint

Started by
9 comments, last by igni ferroque 18 years, 10 months ago
I'm working through a book to make a game in Java, but when I edit the images in Microsoft Paint then execute the code the image's background is visible even though I still saved it as PNG? How come this happens, and whjat should I do to counter it? I've made games in shockwave before and edited images in it by deleting the background from the sprites, but whats up here? Thanks for any help. Mick
Advertisement
You'll be needing to make the background pixels transparent.

I'm not sure how this is done in Java though, you'll need to have all your background pixels in a different colour to all other parts of the rest of the image, and make the pixels of that special colour transparent.

I can do this in SDL, but that's C++.
Perhaps whatever you're using just doesn't like alpha channels.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
What your looking for is often called color keying. Its replaces a single, specific color with a total transparancy. I should think most graphics packages support this in some form, but I have no idea about Java.
Quote:Original post by ukdeveloper
You'll be needing to make the background pixels transparent.


Yeah that's why I said I'd done it in shockwave gifs before, because Paint allows you to use the rubber to rub out the background pixels, then they appear transparent in the game. Although I thought it might be related to Paint and how it saves PNG, anyone any thoughts on what freeware packages are out there for editing images, I used Photoshop at college but couldn't afford to buy it, as it's the programming side of this that I'm concentrating on, just the sprites need edited.

Thanks
Mick.
Try GIMP
thanks man this is exactly what I was looking for, only got it, but very simple to use.

Thanks
Mick.
Or try Paint .NET

Cheers

[Edited by - ernow on June 19, 2005 4:12:22 AM]
Fixed.

Also, I think it's funny that the Paint.NET website is running on a Linux server.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Quote:Original post by smart_idiot
Fixed.

Also, I think it's funny that the Paint.NET website is running on a Linux server.


[smile] Just a little ironic isn't it? [lol]

This topic is closed to new replies.

Advertisement