public abstract class ReduceImage extends Object
Usage: java ca.bc.webarts.widgets.ReduceImage [directory] The directory is not required... if NOT spec'd the current dir will be processed.
Modifier and Type | Field and Description |
---|---|
protected boolean |
dateStampImage_
The dir name where the reduced files will go.
|
protected static String |
DEFAULT_FILE_EXTENSION
The default image fileextension to look for to convert.
|
protected static int |
DEFAULT_REDUCED_X
The default reduced size X.
|
protected static int |
DEFAULT_REDUCED_Y
The default reduced size Y.
|
protected static int |
DEFAULT_REDUCTION_PERCENTAGE
The default reduduction size percentage.
|
protected static int |
DEFAULT_REDUCTION_QUALITY
The default reduduction quality.
|
protected static String |
DEFAULT_SAVE_LOCATION
A holder for the directory location to save downloads.
|
protected int |
reduceByPercentage_
The reduduction size percentage.
|
protected int |
reduceSizeX_
The reduced size X.
|
protected int |
reduceSizeY_
The reduced size X.
|
protected String |
saveLocation_
The dir name where the reduced files will go.
|
protected static String |
SECONDARY_FILE_EXTENSION |
protected static String |
SYSTEM_FILE_SEPERATOR
A holder for the NA Clients System File Separator.
|
Constructor and Description |
---|
ReduceImage() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getFileExtension() |
abstract String |
getSecondaryFileExtension() |
int |
reduceDir(String fileName,
int reductionSizePercent,
int reducedQuality,
boolean recurseDir)
Does the recursive grunt work to convert a whole dir of files by calling
the impls reduceFile method.
|
int |
reduceDir(String fileName,
int reducedSizeX,
int reducedSizeY,
int reducedQuality,
boolean recurseDir)
Does the recursive grunt work to convert a whole dir of files by calling
the impls reduceFile method.
|
abstract int |
reduceFile(String fileName,
int reductionSizePercent,
int reducedQuality)
Does the grunt work to reduce/convert a single file,
THIS IS THE METHOD THAT MUST BE IMPLEMENTED.
|
abstract int |
reduceFile(String fileName,
int reducedSizeX,
int reducedSizeXY,
int reducedQuality)
Does the grunt work to reduce/convert a single file,
THIS IS THE METHOD THAT MUST BE IMPLEMENTED.
|
protected static final String SYSTEM_FILE_SEPERATOR
protected static final String DEFAULT_SAVE_LOCATION
protected static final int DEFAULT_REDUCTION_PERCENTAGE
protected static final int DEFAULT_REDUCED_X
protected static final int DEFAULT_REDUCED_Y
protected static final int DEFAULT_REDUCTION_QUALITY
protected static final String DEFAULT_FILE_EXTENSION
protected static final String SECONDARY_FILE_EXTENSION
protected int reduceByPercentage_
protected int reduceSizeX_
protected int reduceSizeY_
protected String saveLocation_
protected boolean dateStampImage_
public ReduceImage()
public int reduceDir(String fileName, int reductionSizePercent, int reducedQuality, boolean recurseDir)
fileName
- is the name of the file to convert.reductionSizePercent
- the size to reduce the image by in percent.reducedQuality
- is the name quality param for the reduction
(jpg or png might be spec'd as 75).recurseDir
- is a flag to recursing on sub-dirspublic int reduceDir(String fileName, int reducedSizeX, int reducedSizeY, int reducedQuality, boolean recurseDir)
fileName
- is the name of the file to convert.reducedSizeX
- the X size to reduce the image by .reducedSizeY
- the X size to reduce the image by .reducedQuality
- is the name quality param for the reduction
(jpg or png might be spec'd as 75).recurseDir
- is a flag to recursing on sub-dirspublic abstract int reduceFile(String fileName, int reductionSizePercent, int reducedQuality)
fileName
- is the name of the file to convert.reductionSizePercent
- the size to reduce the image by in percent.reducedQuality
- is the name quality param for the reduction
(jpg or png might be spec'd as 75).public abstract int reduceFile(String fileName, int reducedSizeX, int reducedSizeXY, int reducedQuality)
fileName
- is the name of the file to convert.reducedSizeX
- the X size to reduce the image by .reducedSizeY
- the X size to reduce the image by .reducedQuality
- is the name quality param for the reduction
(jpg or png might be spec'd as 75).public abstract String getFileExtension()
public abstract String getSecondaryFileExtension()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses