public class ImageUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ImageUtils.MutiOutputStreamGenerater |
| Modifier and Type | Field and Description |
|---|---|
static String |
IMAGE_TYPE_BMP |
static String |
IMAGE_TYPE_GIF |
static String |
IMAGE_TYPE_JPEG |
static String |
IMAGE_TYPE_PNG |
static String |
IMAGE_TYPE_PSD |
| Constructor and Description |
|---|
ImageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double |
caculateScaleRatio(int srcWidth,
int srcHeight,
int tagWidth,
int tagHeight) |
static void |
convert(InputStream srcImg,
OutputStream destImg,
String format) |
static void |
cut(InputStream srcImg,
OutputStream destImg,
int x,
int y,
int width,
int height) |
static void |
divideByGrid(InputStream srcImg,
ImageUtils.MutiOutputStreamGenerater osGenerater,
int rowCount,
int colCount) |
static void |
divideBySize(InputStream srcImg,
ImageUtils.MutiOutputStreamGenerater osGenerater,
int cellWidth,
int cellHeight) |
static int |
getLength(String text) |
static void |
gray(InputStream srcImg,
OutputStream destImg) |
static void |
pressImage(InputStream srcImg,
InputStream pressImg,
OutputStream destImg,
String destFileName,
int x,
int y,
float alpha) |
static void |
pressText(InputStream srcImg,
OutputStream destImg,
String pressText,
int x,
int y,
String fontName,
int fontStyle,
int fontSize,
Color color,
float alpha) |
static void |
pressText2(String srcFileName,
String destFileName,
String pressText,
int x,
int y,
String fontName,
int fontStyle,
int fontSize,
Color color,
float alpha) |
static void |
scale(InputStream srcImg,
OutputStream destImg,
double scale) |
static void |
scale(InputStream srcImg,
OutputStream destImg,
int width,
int height,
boolean isFill) |
public static String IMAGE_TYPE_GIF
public static String IMAGE_TYPE_JPEG
public static String IMAGE_TYPE_BMP
public static String IMAGE_TYPE_PNG
public static String IMAGE_TYPE_PSD
public static final void convert(InputStream srcImg, OutputStream destImg, String format)
public static final void gray(InputStream srcImg, OutputStream destImg) throws IOException
IOExceptionpublic static final void scale(InputStream srcImg, OutputStream destImg, double scale) throws IOException
IOExceptionpublic static final void scale(InputStream srcImg, OutputStream destImg, int width, int height, boolean isFill) throws IOException
IOExceptionpublic static double caculateScaleRatio(int srcWidth,
int srcHeight,
int tagWidth,
int tagHeight)
public static final void cut(InputStream srcImg, OutputStream destImg, int x, int y, int width, int height) throws IOException
IOExceptionpublic static final void pressText(InputStream srcImg, OutputStream destImg, String pressText, int x, int y, String fontName, int fontStyle, int fontSize, Color color, float alpha) throws IOException
IOExceptionpublic static final void pressImage(InputStream srcImg, InputStream pressImg, OutputStream destImg, String destFileName, int x, int y, float alpha) throws IOException
IOExceptionpublic static final void pressText2(String srcFileName, String destFileName, String pressText, int x, int y, String fontName, int fontStyle, int fontSize, Color color, float alpha)
public static final void divideByGrid(InputStream srcImg, ImageUtils.MutiOutputStreamGenerater osGenerater, int rowCount, int colCount) throws IOException
IOExceptionpublic static final void divideBySize(InputStream srcImg, ImageUtils.MutiOutputStreamGenerater osGenerater, int cellWidth, int cellHeight) throws IOException
IOExceptionpublic static final int getLength(String text)
Copyright © 2016. All rights reserved.