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 BufferedImage
changeBackgroundColor
(BufferedImage image, Color oldColor, Color newColor) static BufferedImage
clampBackGroundColor
(BufferedImage image, Color backGroundColor, int borderSize, int iterations) static File
correctFile
(File file) static File
correctPath
(File parent, File file) static File
getChildFile
(File parent, String path) static String
getFormatNameByMimeType
(String mimeType) static String
getMimeTypeByExtension
(String extension) static int
getNearestPowerOfTwo
(int value) static int
getNearestPowerOfTwoHigher
(int value) static int
getNearestPowerOfTwoLower
(int value) static BufferedImage
invertImageY
(BufferedImage image) static ByteBuffer
static int[]
readImageSize
(String imagePath) static void
saveBufferedImage
(BufferedImage image, String format, String path) static int
setMinMaxSize
(int size) static float
unpackDepth32
(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
-