Package com.core.util.image
Class SImageUtil
- java.lang.Object
-
- com.core.util.image.SImageUtil
-
public class SImageUtil extends java.lang.Object
- Author:
- Sokkheang.huo
-
-
Constructor Summary
Constructors Constructor Description SImageUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.image.BufferedImage
byteArrayToImage(byte[] byteImage)
static byte[]
imageResize(byte[] byteImage, int width, int height)
static byte[]
imageToByteArray(java.awt.image.BufferedImage img)
static byte[]
imageToByteArray(java.awt.image.BufferedImage img, java.lang.String type)
static java.awt.image.BufferedImage
resizeKeepScale(java.awt.image.BufferedImage img, int width, int height)
-
-
-
Method Detail
-
imageResize
public static byte[] imageResize(byte[] byteImage, int width, int height)
- Parameters:
byteImage
-width
-height
-- Returns:
-
byteArrayToImage
public static java.awt.image.BufferedImage byteArrayToImage(byte[] byteImage)
- Parameters:
byteImage
-- Returns:
-
imageToByteArray
public static byte[] imageToByteArray(java.awt.image.BufferedImage img)
- Parameters:
img
-- Returns:
-
imageToByteArray
public static byte[] imageToByteArray(java.awt.image.BufferedImage img, java.lang.String type)
- Parameters:
img
-type
-- Returns:
-
resizeKeepScale
public static java.awt.image.BufferedImage resizeKeepScale(java.awt.image.BufferedImage img, int width, int height)
- Parameters:
img
-width
-height
-- Returns:
-
-