public class ImageScaler extends Object
Constructor and Description |
---|
ImageScaler() |
Modifier and Type | Method and Description |
---|---|
BufferedImage |
scaleImageToMaxHeight(BufferedImage image,
int maxHeight) |
BufferedImage |
scaleImageToMaxWidth(BufferedImage image,
int maxWidth) |
BufferedImage |
scaleImageToSquare(BufferedImage image,
int maxSize,
boolean crop) |
public BufferedImage scaleImageToMaxHeight(BufferedImage image, int maxHeight)
image
- The BufferedImage
you want to scalemaxHeight
- The maximum height of the scaled imagepublic BufferedImage scaleImageToMaxWidth(BufferedImage image, int maxWidth)
image
- The BufferedImage
you want to scalemaxWidth
- The maximum width of the scaled imagepublic BufferedImage scaleImageToSquare(BufferedImage image, int maxSize, boolean crop)
image
- The BufferedImage
you want to scalemaxSize
- The maximum edge size of the scaled imagecrop
- If the image is rectangular rather than square, then the image will be cropped.Copyright © 2002-2019 Atlassian. All Rights Reserved.