public class ImageUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
String |
compressImg(File outputFile,
File inputFile,
int width,
int height,
boolean proportion) |
String |
compressImg(File outputFile,
InputStream is,
int width,
int height,
boolean proportion) |
void |
compressImg(OutputStream os,
InputStream is,
int width,
int height,
boolean proportion) |
void |
compressImg(OutputStream os,
InputStream is,
int width,
int height,
boolean proportion,
boolean magnify) |
String |
compressImg(String oPath,
InputStream is,
int width,
int height,
boolean proportion) |
String |
compressImg(String oPath,
String iPath,
int width,
int height,
boolean proportion) |
void |
cropImg(OutputStream os,
InputStream is,
String type,
int x,
int y,
int width,
int height) |
String |
cropImg(String oPath,
InputStream is,
int x,
int y,
int width,
int height) |
String |
cropImg(String iPath,
int x,
int y,
int width,
int height) |
String |
cropImg(String oPath,
String iPath,
int x,
int y,
int width,
int height) |
int |
getHeight(File file) |
int |
getHeight(InputStream is) |
int |
getHeight(String path) |
static ImageUtil |
getInstance() |
int |
getWidth(File file) |
int |
getWidth(InputStream is) |
int |
getWidth(String path) |
int[] |
getWidthAndHeight(File file) |
int[] |
getWidthAndHeight(InputStream is) |
int[] |
getWidthAndHeight(String path) |
public static ImageUtil getInstance()
public void cropImg(OutputStream os, InputStream is, String type, int x, int y, int width, int height)
public String cropImg(String oPath, InputStream is, int x, int y, int width, int height)
public void compressImg(OutputStream os, InputStream is, int width, int height, boolean proportion)
public void compressImg(OutputStream os, InputStream is, int width, int height, boolean proportion, boolean magnify)
public String compressImg(File outputFile, File inputFile, int width, int height, boolean proportion)
public String compressImg(File outputFile, InputStream is, int width, int height, boolean proportion)
public String compressImg(String oPath, InputStream is, int width, int height, boolean proportion)
public String compressImg(String oPath, String iPath, int width, int height, boolean proportion)
public int getWidth(InputStream is) throws IOException
IOExceptionpublic int getWidth(String path)
public int getWidth(File file)
public int getHeight(InputStream is) throws IOException
IOExceptionpublic int getHeight(String path)
public int getHeight(File file)
public int[] getWidthAndHeight(InputStream is) throws IOException
IOExceptionpublic int[] getWidthAndHeight(String path)
public int[] getWidthAndHeight(File file)
Copyright © 2015. All rights reserved.