This question is a duplicate of this question:
Making every pixel of an image having a specific color transparent
But I need a Java equivalent. And I need a image-type (like PNG, BMP, …) which can hold this color with full transparency (alpha = 0). And of course a way to save it as a file.
Modified the code to make each pixel transparent
Source :http://www.rgagnon.com/javadetails/java-0265.html