Class Overview
Helper class for managing scaling of images based on provided dimensions argument.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
Public Methods
public
BufferedImage
scaleImageToMaxHeight
(BufferedImage image, int maxHeight)
Parameters
image
| The BufferedImage you want to scale |
maxHeight
| 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
Parameters
image
| The BufferedImage you want to scale |
maxWidth
| 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
public
BufferedImage
scaleImageToSquare
(BufferedImage image, int maxSize, boolean crop)
Parameters
image
| The BufferedImage you want to scale |
maxSize
| The maximum edge size of the scaled image |
crop
| If the image is rectangular rather than square, then the image will be cropped. |