Package com.gaia3d.util
Class ImageUtils
java.lang.Object
com.gaia3d.util.ImageUtils
Utility class for image operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic float[][]static BufferedImagechangeBackgroundColor(BufferedImage image, Color oldColor, Color newColor) static BufferedImageclampBackGroundColor(BufferedImage image, Color backGroundColor, int borderSize, int iterations) static FilecorrectFile(File file) static FilecorrectPath(File parent, File file) static FilegetChildFile(File parent, String path) static StringgetFormatNameByMimeType(String mimeType) static StringgetMimeTypeByExtension(String extension) static intgetNearestPowerOfTwo(int value) static intgetNearestPowerOfTwoHigher(int value) static intgetNearestPowerOfTwoLower(int value) static BufferedImageinvertImageY(BufferedImage image) static ByteBufferstatic int[]readImageSize(String imagePath) voidsaveBufferedImage(BufferedImage image, String format, String path) static intsetMinMaxSize(int size) static floatunpackDepth32(float[] packedDepth)
-
Constructor Details
-
ImageUtils
public ImageUtils()
-
-
Method Details
-
getNearestPowerOfTwo
public static int getNearestPowerOfTwo(int value) -
getNearestPowerOfTwoHigher
public static int getNearestPowerOfTwoHigher(int value) -
getNearestPowerOfTwoLower
public static int getNearestPowerOfTwoLower(int value) -
setMinMaxSize
public static int setMinMaxSize(int size) -
getFormatNameByMimeType
-
getMimeTypeByExtension
-
readFile
-
getChildFile
-
correctFile
-
correctPath
- Throws:
FileNotFoundException
-
readImageSize
-
unpackDepth32
public static float unpackDepth32(float[] packedDepth) -
bufferedImageToFloatMatrix
-
invertImageY
-
clampBackGroundColor
public static BufferedImage clampBackGroundColor(BufferedImage image, Color backGroundColor, int borderSize, int iterations) -
changeBackgroundColor
public static BufferedImage changeBackgroundColor(BufferedImage image, Color oldColor, Color newColor) -
saveBufferedImage
-