|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.openstego.util.ImageUtil
Image utilities
| Field Summary | |
static String |
DEFAULT_IMAGE_TYPE
Default image type in case not provided |
| Method Summary | |
static BufferedImage |
byteArrayToImage(byte[] imageData,
String imgFileName)
Method to convert byte array to image |
static BufferedImage |
cropImage(BufferedImage image,
int cropWidth,
int cropHeight)
Method crop an image to the given dimensions. |
static BufferedImage |
generateRandomImage(int numOfPixels)
Method to generate a random image filled with noise. |
static BufferedImage |
getDiffImage(BufferedImage leftImage,
BufferedImage rightImage)
Method generate difference image between two given images |
static BufferedImage |
getImageFromYuv(ArrayList yuv)
Get image (with RGB data) from given YUV data |
static ArrayList |
getYuvFromImage(BufferedImage image)
Get YUV data from given image's RGB data |
static byte[] |
imageToByteArray(BufferedImage image,
String imageFileName,
OpenStegoPlugin plugin)
Method to convert BufferedImage to byte array |
static BufferedImage |
makeImageSquare(BufferedImage image)
Method to pad an image such that it becomes perfect square. |
static int |
pixelRange(double p)
Utility method to limit the value within [0,255] range |
static int |
pixelRange(int p)
Utility method to limit the value within [0,255] range |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static String DEFAULT_IMAGE_TYPE
| Method Detail |
public static BufferedImage generateRandomImage(int numOfPixels)
throws OpenStegoException
numOfPixels - Number of pixels required in the image
OpenStegoException
public static byte[] imageToByteArray(BufferedImage image,
String imageFileName,
OpenStegoPlugin plugin)
throws OpenStegoException
image - Image dataimageFileName - Name of the image fileplugin - Reference to the plugin
OpenStegoException
public static BufferedImage byteArrayToImage(byte[] imageData,
String imgFileName)
throws OpenStegoException
imageData - Image data as byte arrayimgFileName - Name of the image file
OpenStegoExceptionpublic static ArrayList getYuvFromImage(BufferedImage image)
image - Image
public static BufferedImage getImageFromYuv(ArrayList yuv)
yuv - List with three elements of two-dimensional int's - Y, U and V
public static int pixelRange(int p)
p - Input value
public static int pixelRange(double p)
p - Input value
public static BufferedImage makeImageSquare(BufferedImage image)
image - Input image
public static BufferedImage cropImage(BufferedImage image,
int cropWidth,
int cropHeight)
image - Input imagecropWidth - Width required for cropped imagecropHeight - Height required for cropped image
public static BufferedImage getDiffImage(BufferedImage leftImage,
BufferedImage rightImage)
throws OpenStegoException
leftImage - Left input imagerightImage - Right input image
OpenStegoException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||