|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.openstego.util.ImageUtil
public class ImageUtil
Image utilities
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_IMAGE_TYPE
Default image type in case not provided |
| Method Summary | |
|---|---|
static java.awt.image.BufferedImage |
byteArrayToImage(byte[] imageData,
java.lang.String imgFileName)
Method to convert byte array to image |
static java.awt.image.BufferedImage |
cropImage(java.awt.image.BufferedImage image,
int cropWidth,
int cropHeight)
Method crop an image to the given dimensions. |
static java.awt.image.BufferedImage |
generateRandomImage(int numOfPixels)
Method to generate a random image filled with noise. |
static java.awt.image.BufferedImage |
getDiffImage(java.awt.image.BufferedImage leftImage,
java.awt.image.BufferedImage rightImage)
Method generate difference image between two given images |
static java.awt.image.BufferedImage |
getImageFromYuv(java.util.ArrayList yuv)
Get image (with RGB data) from given YUV data |
static java.util.ArrayList |
getYuvFromImage(java.awt.image.BufferedImage image)
Get YUV data from given image's RGB data |
static byte[] |
imageToByteArray(java.awt.image.BufferedImage image,
java.lang.String imageFileName,
OpenStegoPlugin plugin)
Method to convert BufferedImage to byte array |
static java.awt.image.BufferedImage |
makeImageSquare(java.awt.image.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 java.lang.String DEFAULT_IMAGE_TYPE
| Method Detail |
|---|
public static java.awt.image.BufferedImage generateRandomImage(int numOfPixels)
throws OpenStegoException
numOfPixels - Number of pixels required in the image
OpenStegoException
public static byte[] imageToByteArray(java.awt.image.BufferedImage image,
java.lang.String imageFileName,
OpenStegoPlugin plugin)
throws OpenStegoException
image - Image dataimageFileName - Name of the image fileplugin - Reference to the plugin
OpenStegoException
public static java.awt.image.BufferedImage byteArrayToImage(byte[] imageData,
java.lang.String imgFileName)
throws OpenStegoException
imageData - Image data as byte arrayimgFileName - Name of the image file
OpenStegoExceptionpublic static java.util.ArrayList getYuvFromImage(java.awt.image.BufferedImage image)
image - Image
public static java.awt.image.BufferedImage getImageFromYuv(java.util.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 java.awt.image.BufferedImage makeImageSquare(java.awt.image.BufferedImage image)
image - Input image
public static java.awt.image.BufferedImage cropImage(java.awt.image.BufferedImage image,
int cropWidth,
int cropHeight)
image - Input imagecropWidth - Width required for cropped imagecropHeight - Height required for cropped image
public static java.awt.image.BufferedImage getDiffImage(java.awt.image.BufferedImage leftImage,
java.awt.image.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 | ||||||||