Take a look at java.awt.BufferedImage. By setting up two BufferedImages, you can analyse each pixel in the first (the original image), and set the transparency (alpha channel) in the other. Pixels have the RGBA values, so the last octet in an int is the alpha (transparency) value.
Oh, and look into javax.imageio.ImageIO for importing BufferedImages from/exporting BufferedImages to files. [ December 10, 2008: Message edited by: Charles Lyons ]
Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / AmazonAmazon UK )