public class ImageUtils extends Object
| Constructor and Description |
|---|
ImageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
bytes2int(byte[] in,
int index1,
int index2,
int index3) |
static int[] |
bytes2int(byte[] in,
int index1,
int index2,
int index3,
int index4) |
static BufferedImage |
convert(BufferedImage src,
int bufImgType) |
static byte[] |
copyJpegMetaData(byte[] source,
byte[] dest)
Copy jpeg meta data (exif) from source to dest and save it to out.
|
static void |
copyJpegMetaData(InputStream source,
InputStream dest,
ImageOutputStream out)
Copy jpeg meta data (exif) from source to dest and save it to out
|
static byte[] |
getPixelsBGR(BufferedImage img,
int y,
int w,
byte[] array,
int[] temp)
returns one row (height == 1) of byte packed image data in BGR or AGBR form
|
static String |
imageTypeName(BufferedImage img) |
static void |
ints2bytes(int[] in,
byte[] out,
int index1,
int index2,
int index3) |
static void |
ints2bytes(int[] in,
byte[] out,
int index1,
int index2,
int index3,
int index4) |
static int |
nrChannels(BufferedImage img) |
static void |
setBGRPixels(byte[] bgrPixels,
BufferedImage img,
int x,
int y,
int w,
int h)
converts and copies byte packed BGR or ABGR into the img buffer,
the img type may vary (e.g.
|
public static String imageTypeName(BufferedImage img)
public static int nrChannels(BufferedImage img)
public static byte[] getPixelsBGR(BufferedImage img, int y, int w, byte[] array, int[] temp)
img - y - w - array - temp - must be either null or a array with length of w*hpublic static void setBGRPixels(byte[] bgrPixels,
BufferedImage img,
int x,
int y,
int w,
int h)
public static void ints2bytes(int[] in,
byte[] out,
int index1,
int index2,
int index3)
public static void ints2bytes(int[] in,
byte[] out,
int index1,
int index2,
int index3,
int index4)
public static int[] bytes2int(byte[] in,
int index1,
int index2,
int index3)
public static int[] bytes2int(byte[] in,
int index1,
int index2,
int index3,
int index4)
public static BufferedImage convert(BufferedImage src, int bufImgType)
public static byte[] copyJpegMetaData(byte[] source,
byte[] dest)
throws IOException
source - dest - IOExceptionpublic static void copyJpegMetaData(InputStream source, InputStream dest, ImageOutputStream out) throws IOException
source - dest - out - IOExceptionCopyright © 2014. All rights reserved.