Save buffered image with transparent background
I'm saving the image of a signature as a .jpg picture. I use graphic2d to paint on the image every pixel of the signature (gotten with a signature tablet) and it works perfectly but I'm always gettin a white background. If I want to put the signature on a PDF document, the borders of the white square of the jpg image covers some of the words of the PDF. What I want to get is to save the jpg image with a transparent background, so when I put it on the PDF there are no words covered with the white image background but just the signature lines. This is the code that saves the buffered image. It