I am trying to automatically change the color for a set of icons. Every icon has a white filled layer and the other part is transparent. Here is an example: (in this case it\'s
The problem is, that
Color originalColor = new Color(image.getRGB(xx, yy));
discards all the alpha values. Instead you have to use
Color originalColor = new Color(image.getRGB(xx, yy), true);
to keep alpha values available.