Class CropFilter

java.lang.Object
net.jalbum.filters.CropFilter
All Implemented Interfaces:
Serializable, JAFilter, ModifiesSize

public class CropFilter extends Object implements JAFilter, ModifiesSize
Crop images to specified dimension
Since:
15
See Also:
  • Constructor Details

    • CropFilter

      public CropFilter()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface JAFilter
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface JAFilter
    • getBounds

      public Dimension getBounds()
    • setBounds

      public void setBounds(Dimension bounds)
    • getXWeight

      public float getXWeight()
    • setXWeight

      public void setXWeight(float weight)
      Control what area of the image to use when cropping occurs Defaults to 50%, i.e focus on the middle part of the source image Can be overridden by the "xWeight" user variable
      Since:
      1.1
    • getYWeight

      public float getYWeight()
    • setYWeight

      public void setYWeight(float weight)
      Control what area of the image to use when cropping occurs Defaults to 20%, i.e focus on the topmost part of the source image Can be overridden by the "yWeight" user variable
      Since:
      1.1
    • filter

      public BufferedImage filter(BufferedImage bi, Map vars)
      Specified by:
      filter in interface JAFilter
    • getModifiedSize

      public Dimension getModifiedSize(Dimension originalSize, Map vars)
      Description copied from interface: ModifiesSize
      Calculate the size an image would have after being processed by this filter.
      Specified by:
      getModifiedSize in interface ModifiesSize
      Parameters:
      originalSize -
      vars -
      Returns: