public class ImageUtils extends Object
Utility methods for images
| Modifier and Type | Method and Description |
|---|---|
static float[] |
getScaledDimension(float imageWidth,
float imageHeight,
float boundWidth,
float boundHeight)
|
static Image |
readImage(File imageFile)
Simple reading image from file
|
public static Image readImage(File imageFile) throws IOException
Simple reading image from file
imageFile - File from which image will be loadedImageIOException - if loading image failspublic static float[] getScaledDimension(float imageWidth,
float imageHeight,
float boundWidth,
float boundHeight)
imageWidth - Original image widthimageHeight - Original image heightboundWidth - Desired image widthboundHeight - Desired image heightArray with image dimension. First value is width and second is height.Copyright © 2020. All rights reserved.