public class EasyImageCompressionUtils extends Object
| Constructor and Description |
|---|
EasyImageCompressionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
compressPicByMaxHeight(File sourceFile,
File toFile,
int maxHeight)
根据最大高度压缩图片
|
static boolean |
compressPicByMaxHeight(File sourceFile,
int maxHeight)
根据最大高度压缩图片
|
static boolean |
compressPicByMaxHeight(File sourceFile,
String toPath,
int maxHeight)
根据最大高度压缩图片
|
static boolean |
compressPicByMaxHeight(String fromPath,
File toFile,
int maxHeight)
根据最大高度压缩图片
|
static boolean |
compressPicByMaxHeight(String fromPath,
int maxHeight)
根据最大高度压缩图片
|
static boolean |
compressPicByMaxHeight(String fromPath,
String toPath,
int maxHeight)
根据最大高度压缩图片
|
static boolean |
compressPicByMaxWidth(File sourceFile,
File toFile,
int maxWidth)
根据最大宽度压缩图片
|
static boolean |
compressPicByMaxWidth(File sourceFile,
int maxWidth)
根据最大宽度压缩图片
|
static boolean |
compressPicByMaxWidth(File sourceFile,
String toPath,
int maxWidth)
根据最大宽度压缩图片
|
static boolean |
compressPicByMaxWidth(String fromPath,
File toFile,
int maxWidth)
根据最大宽度压缩图片
|
static boolean |
compressPicByMaxWidth(String fromPath,
int maxWidth)
根据最大宽度压缩图片
|
static boolean |
compressPicByMaxWidth(String fromPath,
String toPath,
int maxWidth)
根据最大宽度压缩图片
|
static boolean |
compressPicByMaxWidthAndMaxHeight(File sourceFile,
File toFile,
int maxWidth,
int maxHeight)
根据最大宽度和高度压缩图片
|
static boolean |
compressPicByMaxWidthAndMaxHeight(File sourceFile,
int maxWidth,
int maxHeight)
根据最大宽度和高度压缩图片
|
static boolean |
compressPicByMaxWidthAndMaxHeight(File sourceFile,
String toPath,
int maxWidth,
int maxHeight)
根据最大宽度和高度压缩图片
|
static boolean |
compressPicByMaxWidthAndMaxHeight(String fromPath,
File toFile,
int maxWidth,
int maxHeight)
根据最大宽度和高度压缩图片
|
static boolean |
compressPicByMaxWidthAndMaxHeight(String fromPath,
int maxWidth,
int maxHeight)
根据最大宽度和高度压缩图片
|
static boolean |
compressPicByMaxWidthAndMaxHeight(String fromPath,
String toPath,
int maxWidth,
int maxHeight)
根据最大宽度和高度压缩图片
|
static boolean |
compressPicByWidthAndHeight(File sourceFile,
File toFile,
int width,
int height)
根据指定宽度和高度压缩图片
|
static boolean |
compressPicByWidthAndHeight(File sourceFile,
int width,
int height)
根据指定宽度和高度压缩图片
|
static boolean |
compressPicByWidthAndHeight(File sourceFile,
String toPath,
int width,
int height)
根据指定宽度和高度压缩图片
|
static boolean |
compressPicByWidthAndHeight(String fromPath,
File toFile,
int width,
int height)
根据指定宽度和高度压缩图片
|
static boolean |
compressPicByWidthAndHeight(String fromPath,
int width,
int height)
根据指定宽度和高度压缩图片
|
static boolean |
compressPicByWidthAndHeight(String fromPath,
String toPath,
int width,
int height)
根据指定宽度和高度压缩图片
|
public static boolean compressPicByMaxHeight(File sourceFile, File toFile, int maxHeight)
sourceFile - 要压缩的文件toFile - 压缩后的文件maxHeight - 最大高度public static boolean compressPicByMaxHeight(File sourceFile, int maxHeight)
sourceFile - 要压缩的文件maxHeight - 最大高度public static boolean compressPicByMaxHeight(File sourceFile, String toPath, int maxHeight)
sourceFile - 要压缩的文件toPath - 保存的图片文件路径maxHeight - 最大高度public static boolean compressPicByMaxHeight(String fromPath, File toFile, int maxHeight)
fromPath - 图片路径(包括http://开头的网络图片)toFile - 压缩后的文件maxHeight - 最大高度public static boolean compressPicByMaxHeight(String fromPath, int maxHeight)
fromPath - 图片路径(包括http://开头的网络图片)maxHeight - 最大高度public static boolean compressPicByMaxHeight(String fromPath, String toPath, int maxHeight)
fromPath - 图片路径(包括http://开头的网络图片)toPath - 保存的图片文件路径maxHeight - 最大高度public static boolean compressPicByMaxWidth(File sourceFile, File toFile, int maxWidth)
sourceFile - 要压缩的文件toFile - 压缩后的文件maxWidth - 最大宽度public static boolean compressPicByMaxWidth(File sourceFile, int maxWidth)
sourceFile - 要压缩的文件maxWidth - 最大宽度public static boolean compressPicByMaxWidth(File sourceFile, String toPath, int maxWidth)
sourceFile - 要压缩的文件toPath - 保存的图片文件路径maxWidth - 最大宽度public static boolean compressPicByMaxWidth(String fromPath, File toFile, int maxWidth)
fromPath - 图片路径(包括http://开头的网络图片)toFile - 压缩后的文件maxWidth - 最大宽度public static boolean compressPicByMaxWidth(String fromPath, int maxWidth)
fromPath - 图片路径(包括http://开头的网络图片)maxWidth - 最大宽度public static boolean compressPicByMaxWidth(String fromPath, String toPath, int maxWidth)
fromPath - 图片路径(包括http://开头的网络图片)toPath - 保存的图片文件路径maxWidth - 最大宽度public static boolean compressPicByMaxWidthAndMaxHeight(File sourceFile, File toFile, int maxWidth, int maxHeight)
sourceFile - 要压缩的文件toFile - 压缩后的文件maxWidth - 最大宽度maxHeight - 最大高度public static boolean compressPicByMaxWidthAndMaxHeight(File sourceFile, int maxWidth, int maxHeight)
sourceFile - 要压缩的文件maxWidth - 最大宽度maxHeight - 最大高度public static boolean compressPicByMaxWidthAndMaxHeight(File sourceFile, String toPath, int maxWidth, int maxHeight)
sourceFile - 要压缩的文件toPath - 保存的图片文件路径maxWidth - 最大宽度maxHeight - 最大高度public static boolean compressPicByMaxWidthAndMaxHeight(String fromPath, File toFile, int maxWidth, int maxHeight)
fromPath - 图片路径(包括http://开头的网络图片)toFile - 压缩后的文件maxWidth - 最大宽度maxHeight - 最大高度public static boolean compressPicByMaxWidthAndMaxHeight(String fromPath, int maxWidth, int maxHeight)
fromPath - 图片路径(包括http://开头的网络图片)maxWidth - 最大宽度maxHeight - 最大高度public static boolean compressPicByMaxWidthAndMaxHeight(String fromPath, String toPath, int maxWidth, int maxHeight)
fromPath - 图片路径(包括http://开头的网络图片)toPath - 保存的图片文件路径maxWidth - 最大宽度maxHeight - 最大高度public static boolean compressPicByWidthAndHeight(File sourceFile, File toFile, int width, int height)
sourceFile - 要压缩的文件toFile - 压缩后的文件width - 指定宽度,-1代表不变height - 指定高度,-1代表不变public static boolean compressPicByWidthAndHeight(File sourceFile, int width, int height)
sourceFile - 要压缩的文件width - 指定宽度,-1代表不变height - 指定高度,-1代表不变public static boolean compressPicByWidthAndHeight(File sourceFile, String toPath, int width, int height)
sourceFile - 要压缩的文件toPath - 保存的图片文件路径width - 指定宽度,-1代表不变height - 指定高度,-1代表不变public static boolean compressPicByWidthAndHeight(String fromPath, File toFile, int width, int height)
fromPath - 图片路径(包括http://开头的网络图片)toFile - 压缩后的文件width - 指定宽度,-1代表不变height - 指定高度,-1代表不变public static boolean compressPicByWidthAndHeight(String fromPath, int width, int height)
fromPath - 图片路径(包括http://开头的网络图片)width - 指定宽度,-1代表不变height - 指定高度,-1代表不变Copyright © 2015. All rights reserved.