com.silverpeas.gallery.processing
Class Watermarker

java.lang.Object
  extended by com.silverpeas.gallery.processing.Watermarker

public class Watermarker
extends Object

Author:
ehugonnet

Constructor Summary
Watermarker()
           
Watermarker(int width, int height)
           
 
Method Summary
 void addWatermark(BufferedImage source, BufferedImage target, Font watermarkFont, String watermarkLabel, int watermarkSize)
          Add a watermark to a buffered image fullfilling a new BufferedImage.
 void addWatermark(BufferedImage scaledImage, Font watermarkFont, String watermarkLabel, int watermarkSize)
          Add a watermark to a buffered image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Watermarker

public Watermarker()

Watermarker

public Watermarker(int width,
                   int height)
Method Detail

addWatermark

public void addWatermark(BufferedImage scaledImage,
                         Font watermarkFont,
                         String watermarkLabel,
                         int watermarkSize)
Add a watermark to a buffered image.

Parameters:
scaledImage - the buffered image.
watermarkFont - the font to write the watermark in.
watermarkLabel - the label to be written.
watermarkSize - the size of the watermark.

addWatermark

public void addWatermark(BufferedImage source,
                         BufferedImage target,
                         Font watermarkFont,
                         String watermarkLabel,
                         int watermarkSize)
Add a watermark to a buffered image fullfilling a new BufferedImage.

Parameters:
source - the buffered image source.
source - the buffered image target : containing the image and the watermark.
watermarkFont - the font to write the watermark in.
watermarkLabel - the label to be written.
watermarkSize - the size of the watermark.


Copyright © 2016 Silverpeas. All Rights Reserved.