title: Merging two images
body: <p>I need to merge two images (BufferedImage) in Java. It wouldn't be a problem if there was no transparency. The base image already has some transparency. I want to keep this as it is and apply a "mask" to it, the second image. This second image has no opaque pixels, in fact it's almost completely transparent, just has some less transparent pixels to give some sort of "light effect", like a reflex. Important detail: I don't want to do this on screen, with graphics, I need to obtain a BufferedImage with the resultant merge. </p>
  
  <p>Can anyone help me?
  Thanks!</p>
  
  <p>DETAILS: Merge two images maintaining transparency. This is what I need to do.</p>
  
  <p>Note: this <a href="https://stackoverflow.com/questions/221830/set-bufferedimage-alpha-mask-in-java">Set BufferedImage alpha mask in Java</a> does not do what I need because it does not handle well with the two images having transparency - it modifies first picture transparency.</p>