This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Duta
Duta presents ...

2012/2/12

Transparency

Three methods for removing the background from an image. Not anywhere near perfect, but if you don't want to spend the time downloading photoshop or similar, it might be worth giving this a try :)

Method 1: Removes any color in the image that is equal to java.awt.Color.WHITE - aka perfectly white.
Method 2: Removes any color in the images that is pretty much white - to modify _how_ pretty much white you want to look for, modify line 27 in Actor2.class (int range).
Method 3: Removes whatever color occurs most often in the image.

6263 views / 30 in the last 7 days

2 votes | 0 in the last 7 days

Tags: with-source

This scenario is a member of: Image manipulation


open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Sun Feb 12 18:13:13 UTC 2012 Actually working now :) Thanks to @kiarocks for sorting out my problem with Lists

Want to leave a comment? You must first log in.

Who likes this?

Game/maniac javaNewbie