All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.javadoc.org.spincast.plugins.watermarker.SpincastImageWatermarkerDefault.html Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version






SpincastImageWatermarkerDefault (org.spincast:spincast-framework 1.0.0 API)












org.spincast.plugins.watermarker

Class SpincastImageWatermarkerDefault

  • java.lang.Object
    • org.spincast.plugins.watermarker.SpincastImageWatermarkerDefault
    • Method Detail

      • getWatermarkerId

        protected String getWatermarkerId()
      • getText

        public String getText()
      • getTextColor

        public Color getTextColor()
      • getBackgroundColor

        public Color getBackgroundColor()
      • getTextFont

        public Font getTextFont()
      • getImageFilePath

        public String getImageFilePath()
      • isImageFileOnClasspath

        public boolean isImageFileOnClasspath()
      • getPosition

        public net.coobird.thumbnailator.geometry.Position getPosition()
      • getMargin

        public Integer getMargin()
      • getOpacity

        public float getOpacity()
      • getPercentageWidth

        public int getPercentageWidth()
      • getBorderWidth

        public Integer getBorderWidth()
      • getBorderColor

        public Color getBorderColor()
      • getMainTempDir

        protected File getMainTempDir()
      • getWatermarkImagesTempDir

        protected File getWatermarkImagesTempDir()
      • isImageWatermark

        protected boolean isImageWatermark()
      • getDefaultFont

        protected Font getDefaultFont()
      • createTextWatermarkBaseImage

        protected BufferedImage createTextWatermarkBaseImage()
      • getFontSizeToCreateTextWatermarkBaseImage

        protected float getFontSizeToCreateTextWatermarkBaseImage()
      • getWatermarkOriginalImage

        protected BufferedImage getWatermarkOriginalImage()
      • getWatermarkImageForWidth

        protected BufferedImage getWatermarkImageForWidth(int width)
      • getTargetWatermarkImageWidth

        protected int getTargetWatermarkImageWidth(BufferedImage originalImage)
      • watermark

        public void watermark(String originalImagePath,
                              File targetFile)
        Description copied from interface: SpincastImageWatermarker
        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.

        Specified by:
        watermark in interface SpincastImageWatermarker
        targetFile - The file where the watermarked version will be saved. If this file already exists, it is overwritten.
      • watermark

        public void watermark(String originalImagePath,
                              boolean onClasspath,
                              File targetFile)
        Description copied from interface: SpincastImageWatermarker
        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.

        Specified by:
        watermark in interface SpincastImageWatermarker
        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.
      • getOutputType

        protected String getOutputType(File targetFile)

Copyright © 2019. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy