title: Watermarking on TIFF image
body: <p>I am Trying to put watermark on images using java. Currently I put watermark on images with extension with png, jpeg but the code is not working on tiff image.
  Previously it was giving null pointer error but after including twelvemonkey core and tiff plugin jars null pointer error was gone and code is executing line by line. But the output tiff image dosn't have the watermark.</p>
  
  <pre><code>            BufferedImage sourceImage = ImageIO.read(...);
              Graphics2D g2d = (Graphics2D) sourceImage.getGraphics();
  
              AlphaComposite alphaChannel = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.1f);
              g2d.setComposite(alphaChannel);
              g2d.setColor(Color.BLACK);
              g2d.setFont(new java.awt.Font("Times New Roman", Font.BOLD, 64));
              FontMetrics fontMetrics = g2d.getFontMetrics();
              Rectangle2D rect = fontMetrics.getStringBounds(watermarkText, g2d);
  
              int centerX = (sourceImage.getWidth() - (int) rect.getWidth()) / 2;
              int centerY = sourceImage.getHeight() / 2;
  
              FontMetrics fm = g2d.getFontMetrics();
  
              g2d.drawString(watermarkText, centerX, centerY);
  
              ImageIO.write(sourceImage,extension, outFile);
  </code></pre>
  
  <p>Can anyone gives a way to put watermark on tiff image?</p>