This site requires JavaScript, please enable it in your browser!
Greenfoot back
101929ha
101929ha wrote ...

2017/3/23

Transparency of image

101929ha 101929ha

2017/3/23

#
I am making a Tower Defence game and my graphics (a tank, quadbike, infantry, arrow for next wave) have a white border. So I made it a transparent border by going to Online Image Editor and using transparency. I finished, downloaded, made sure the border was transparent, and then when I put then into Greenfoot the infantry and tank have a black border, but the arrow and quadbike have a transparent border. I am wondering why this is and how I can prevent it. Please help and thanks in advance.
danpost danpost

2017/3/23

#
You could try running your images through my Image Transparency Adder/Trimmer scenario. Just load and save to remove excess transparencies. If there are other colors you wish to make transparent, you can click on them and manually make them transparent via the Make Transparent button. You can change the background if it hides the color you wish to remove via the Change Background button. Remember to always back up images before modifying them.
101929ha 101929ha

2017/3/24

#
Heaps of the code (in your scenario) have a red underline and complains about 'incompatible types: java.awt.Color cannot be converted to greenfoot.Color'. Is there a 3.1.0 version? And besides, I am very certain that they are properly transparent, the problem is in Greenfoot. Remember I put 4 graphics through the same process and 2 came out perfect.
danpost danpost

2017/3/24

#
101929ha wrote...
Heaps of the code (in your scenario) have a red underline and complains about 'incompatible types: java.awt.Color cannot be converted to greenfoot.Color'.
Oh :( I guess that would be a problem then. Since I am not running the newer version of greenfoot, there will not be a newer version of the scenario. Sorry. Maybe I can upload it with a pre-created application file that will run outside of greenfoot. I might have to do that.
You need to login to post a reply.