public class ReduceJPEG extends ReduceImage
Usage: java ca.bc.webarts.widgets.ReduceJPEG [directory] The directory is not required... if NOT spec'd the current dir will be processed.
Modifier and Type | Field and Description |
---|---|
protected String |
imageFileExtension_
The file extension to search for.
|
protected String |
imageSecondaryFileExtension_ |
dateStampImage_, DEFAULT_FILE_EXTENSION, DEFAULT_REDUCED_X, DEFAULT_REDUCED_Y, DEFAULT_REDUCTION_PERCENTAGE, DEFAULT_REDUCTION_QUALITY, DEFAULT_SAVE_LOCATION, reduceByPercentage_, reduceSizeX_, reduceSizeY_, saveLocation_, SECONDARY_FILE_EXTENSION, SYSTEM_FILE_SEPERATOR
Constructor and Description |
---|
ReduceJPEG()
The default empty constructor for this class.
|
ReduceJPEG(int reducedSizeX,
int reducedSizeY,
String dirStr)
The main constructor for this class.
|
ReduceJPEG(int reductionSizePercent,
String dirStr)
The main constructor for this class.
|
ReduceJPEG(String dirStr)
The main constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
String |
getFileExtension() |
String |
getSecondaryFileExtension() |
static void |
main(String[] args)
The main entry for this app.
|
int |
reduceFile(String fileName,
int reductionSizePercent,
int reducedQuality)
Does the grunt work to reduce/convert a single file.
|
int |
reduceFile(String fileName,
int reducedSizeX,
int reducedSizeY,
int reducedQuality)
Does the grunt work to reduce/convert a single file.
|
reduceDir, reduceDir
protected String imageFileExtension_
protected String imageSecondaryFileExtension_
public ReduceJPEG()
public ReduceJPEG(String dirStr)
urlStr
- the string representation of the URL to grab.public ReduceJPEG(int reductionSizePercent, String dirStr)
reductionSizePercent
- the size to reduce the image by in percent.urlStr
- the string representation of the URL to grab.public ReduceJPEG(int reducedSizeX, int reducedSizeY, String dirStr)
reducedSizeX
- the X size to reduce the image by .reducedSizeY
- the X size to reduce the image by .urlStr
- the string representation of the URL to grab.public String getFileExtension()
getFileExtension
in class ReduceImage
public String getSecondaryFileExtension()
getSecondaryFileExtension
in class ReduceImage
public static void main(String[] args)
args
- is a dir to do the deed on (NOT REQUIRED - default is current dir).public int reduceFile(String fileName, int reductionSizePercent, int reducedQuality)
reduceFile
in class ReduceImage
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 int reduceFile(String fileName, int reducedSizeX, int reducedSizeY, int reducedQuality)
reduceFile
in class ReduceImage
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).WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses