java.lang.Object
develop.toolkit.multimedia.image.ImageAdvice
- Author:
- qiushui on 2021-06-20.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImagecut(BufferedImage originalImage, Rectangle rectangle) 裁切图片static voidfixOrientationAndCut(InputStream inputStream, OutputStream outputStream, Rectangle rectangle, com.drew.imaging.FileType outFileType) 修正图片角度后裁切图片static voidfixOrientationAndZoom(InputStream inputStream, OutputStream outputStream, int width, com.drew.imaging.FileType outFileType) 修正图片角度后定宽缩放static BufferedImagerotate(BufferedImage originalImage, int angle) 旋转角度static BufferedImagezoom(BufferedImage originalImage, int width) 定宽缩放
-
Constructor Details
-
ImageAdvice
public ImageAdvice()
-
-
Method Details
-
fixOrientationAndCut
public static void fixOrientationAndCut(InputStream inputStream, OutputStream outputStream, Rectangle rectangle, com.drew.imaging.FileType outFileType) throws IOException 修正图片角度后裁切图片- Parameters:
inputStream- 图片输入流outputStream- 输出流rectangle- 裁切区域outFileType- 输出图片类型- Throws:
IOException
-
fixOrientationAndZoom
public static void fixOrientationAndZoom(InputStream inputStream, OutputStream outputStream, int width, com.drew.imaging.FileType outFileType) throws IOException 修正图片角度后定宽缩放- Parameters:
inputStream- 图片输入流outputStream- 输出流width- 定宽outFileType- 输出图片类型- Throws:
IOException
-
cut
裁切图片- Parameters:
originalImage- 原图rectangle- 裁切区域- Returns:
- 新图片
-
rotate
旋转角度- Parameters:
originalImage- 原图angle- 旋转角度- Returns:
- 新图片
-
zoom
定宽缩放- Parameters:
originalImage- 原图width- 定宽- Returns:
- 新图片
-