Skip to main content
GameDev.net gamedev.net
🔒 Locked

Microsoft Paint

Started by mmca Jun 18, 2005 at 6:10 AM 9 replies 1.8k views
Original Post
mmca
mmca
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
ukdeveloper
ukdeveloper
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++.
smart_idiot
smart_idiot
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
Hesterumpe
Hesterumpe
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.
mmca
mmca
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.
mmca
mmca
thanks man this is exactly what I was looking for, only got it, but very simple to use.

Thanks
Mick.
ernow
ernow
Or try Paint .NET

Cheers

[Edited by - ernow on June 19, 2005 4:12:22 AM]
smart_idiot
smart_idiot
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
igni ferroque
igni ferroque
Quote:
Also, I think it's funny that the Paint.NET website is running on a Linux server.

You think it's funny that a computer science server at a state university would be running Linux? (Apparently they moved to an IIS server for the main site).

Quote:
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

Likely. I'm surprised that it supports PNG in the first place.
Free Mac Mini (I know, I'm a tool)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.