Interface SpincastImageWatermarker

All Known Implementing Classes:
SpincastImageWatermarkerDefault

public interface SpincastImageWatermarker
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    watermark(String originalImagePath, boolean onClasspath, File targetFile)
    Watermark an image.
    void
    watermark(String originalImagePath, File targetFile)
    Watermark an image.
  • Method Details

    • watermark

      void watermark(String originalImagePath, File targetFile)
      Watermark an image.

      The format of the watermaked image is determined by the extension of the targetFile (case-insensitive):

      • .jpg or .jpeg => JPEG
      • .gif => GIF
      • .png => PNG

      If the target file doesn't have any extension, PNG is used.

      Parameters:
      originalImage - The image to watermark, on the file system.
      targetFile - The file where the watermarked version will be saved. If this file already exists, it is overwritten.
    • watermark

      void watermark(String originalImagePath, boolean onClasspath, File targetFile)
      Watermark an image.

      The format of the watermaked image is determined by the extension of the targetFile (case-insensitive):

      • .jpg or .jpeg => JPEG
      • .gif => GIF
      • .png => PNG

      If the target file doesn't have any extension, PNG is used.

      Parameters:
      originalImage - The image to watermark.
      onClasspath - If true, the original image will be taken from the classpath. Otherwise its path must be a path on the file system.
      targetFile - The file where the watermarked version will be saved. If this file already exists, it is overwritten.