com.atlassian.jira.lookandfeel
Class ImageScaler
java.lang.Object
com.atlassian.jira.lookandfeel.ImageScaler
public class ImageScaler
- extends Object
Scales images
- Since:
- v4.4
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageScaler
public ImageScaler()
scaleImageToMaxHeight
public BufferedImage scaleImageToMaxHeight(BufferedImage image,
int maxHeight)
- Parameters:
image
- The BufferedImage
you want to scalemaxHeight
- The maximum height of the scaled image
- Returns:
- a ratio scaled BufferedImage if the height was greater than the maximum height specified, otherwise the image is unchanged
scaleImageToMaxWidth
public BufferedImage scaleImageToMaxWidth(BufferedImage image,
int maxWidth)
- Parameters:
image
- The BufferedImage
you want to scalemaxWidth
- The maximum width of the scaled image
- Returns:
- a ratio scaled BufferedImage if the height was greater than the maximum width specified, otherwise the image is unchanged
scaleImageToSquare
public BufferedImage scaleImageToSquare(BufferedImage image,
int maxSize,
boolean crop)
- Parameters:
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.
- Returns:
- a scaled image
Copyright © 2002-2013 Atlassian. All Rights Reserved.