Search code examples
javagraphicsbufferedimage

Change the alpha value of a BufferedImage?


How do I change the global alpha value of a BufferedImage in Java? (I.E. make every pixel in the image that has a alpha value of 100 have a alpha value of 80)


Solution

  • I don't believe there's a single simple command to do this. A few options:

    The first is the simplest to implement, IMO.