U need something like filtering Image with all transparent pixels..
so do something like ..
first: figure out all transparent pixels.. http://javaalmanac.com/egs/java.awt.image/GetGifColors.html
second: filter all that pixels.. http://javaalmanac.com/egs/java.awt.image/FilterRgb.html
Since transparent pixel does not have RGB.. they are more related to alpha value.. The alpha component of a pixel refers to the transparency or opaqueness of the pixel. check this.. http://www.webbasedprogramming.com/Tricks-of-the-Java-Programming-Gurus/f12-2.gif
Try to read.. http://www.webbasedprogramming.com/Tricks-of-the-Java-Programming-Gurus/ch12.htm
and u will figure out.. urself how to do it.. !!
may be this helps..