Class CropFilter
java.lang.Object
net.jalbum.filters.CropFilter
- All Implemented Interfaces:
Serializable,JAFilter,ModifiesSize
Crop images to specified dimension
- Since:
- 15
- See Also:
-
Field Summary
Fields inherited from interface se.datadosen.jalbum.JAFilter
ALL_POSTSCALE_STAGE, ALL_PRESCALE_STAGE, CLOSEUPS_POSTSCALE_STAGE, FOLDERS_POSTSCALE_STAGE, FOLDERS_PRESCALE_STAGE, THUMBNAILS_POSTSCALE_STAGE, THUMBNAILS_PRESCALE_STAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilter(BufferedImage bi, Map vars) getModifiedSize(Dimension originalSize, Map vars) Calculate the size an image would have after being processed by this filter.getName()floatfloatvoidvoidsetXWeight(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 variablevoidsetYWeight(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
-
Constructor Details
-
CropFilter
public CropFilter()
-
-
Method Details
-
getName
-
getDescription
- Specified by:
getDescriptionin interfaceJAFilter
-
getBounds
-
setBounds
-
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
-
getModifiedSize
Description copied from interface:ModifiesSizeCalculate the size an image would have after being processed by this filter.- Specified by:
getModifiedSizein interfaceModifiesSize- Parameters:
originalSize-vars-- Returns:
-