public class ZoomRotateCrop extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ZoomRotateCrop.Para
(1)原图先翻转,旋转 (flipX,flipY,rotate)
(2)截取crop区域 (cropX,cropY,cropW,cropH)
(3)适配到view(viewW * viewH)
|
| Constructor and Description |
|---|
ZoomRotateCrop() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedImage |
cropZoom(BufferedImage image,
ZoomRotateCrop.Para para)
对图片截取和缩放
|
static BufferedImage |
exec(InputStream photo,
ZoomRotateCrop.Para para)
对图片进行,翻转,旋转,截取,缩放
|
static BufferedImage |
flip(BufferedImage image,
boolean isFlipX)
翻转,要么X轴(上下),要么Y轴(左右)
|
static BufferedImage |
rotate(BufferedImage image,
int degree)
顺时针旋转一个角度(360)
|
public static BufferedImage exec(InputStream photo, ZoomRotateCrop.Para para) throws IOException
photo - 图片para - 参数IOException - if io exceptionpublic static BufferedImage cropZoom(BufferedImage image, ZoomRotateCrop.Para para)
image - 图片para - 参数public static BufferedImage flip(BufferedImage image, boolean isFlipX)
image - 图片isFlipX - 要么X轴(上下)public static BufferedImage rotate(BufferedImage image, int degree)
image - 图片degree - 角度Copyright © 2020. All rights reserved.