|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.util.type.ImageUtil
public final class ImageUtil
The ImageUtil provides useful image operation/manipulation methods.
| Nested Class Summary | |
|---|---|
static class |
ImageUtil.ImageFormat
The image formats. |
| Method Summary | |
|---|---|
static void |
createScaledImage(InputStream pImage,
int pWidth,
int pHeight,
boolean pProportional,
OutputStream pScaledImage,
String pFormat)
Creates a scaled image out of an InputStream. |
static ImageUtil.ImageFormat |
getImageFormat(byte[] pData)
Gets the image format from raw image data. |
static ImageIcon |
getScaledIcon(Icon pIcon,
int pWidth,
int pHeight,
boolean pProportional)
Gets a scaled ImageIcon out of an Icon. |
static ImageIcon |
getScaledIcon(ImageIcon pIcon,
int pWidth,
int pHeight,
boolean pProportional)
Gets a scaled ImageIcon out of an ImageIcon. |
static Image |
getScaledImage(Image pImage,
int pWidth,
int pHeight,
boolean pProportional)
Gets a scaled Image out of an Image. |
static Image |
getScaledImage(Image pImage,
int pType,
int pWidth,
int pHeight,
boolean pProportional)
Gets a scaled Image out of an Image. |
static Image |
getScaledImage(InputStream pImage,
int pWidth,
int pHeight,
boolean pProportional)
Gets a scaled Image out of an InputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ImageIcon getScaledIcon(Icon pIcon,
int pWidth,
int pHeight,
boolean pProportional)
ImageIcon out of an Icon.
pIcon - the iconpWidth - the desired image heightpHeight - the desired image heightpProportional - true for proportional scaling and false for fixed scaling
public static ImageIcon getScaledIcon(ImageIcon pIcon,
int pWidth,
int pHeight,
boolean pProportional)
ImageIcon out of an ImageIcon.
pIcon - the imagepWidth - the desired image heightpHeight - the desired image heightpProportional - true for proportional scaling and false for fixed scaling
public static Image getScaledImage(InputStream pImage,
int pWidth,
int pHeight,
boolean pProportional)
throws IOException
Image out of an InputStream.
pImage - the image streampWidth - the desired image heightpHeight - the desired image heightpProportional - true for proportional scaling and false for fixed scaling
IOException - if an error occurs during image streaming
public static Image getScaledImage(Image pImage,
int pWidth,
int pHeight,
boolean pProportional)
Image out of an Image.
pImage - the imagepWidth - the desired image heightpHeight - the desired image heightpProportional - true for proportional scaling and false for fixed scaling
public static Image getScaledImage(Image pImage,
int pType,
int pWidth,
int pHeight,
boolean pProportional)
Image out of an Image.
pImage - the imagepType - one of the image types of BufferedImagepWidth - the desired image heightpHeight - the desired image heightpProportional - true for proportional scaling and false for fixed scaling
public static void createScaledImage(InputStream pImage,
int pWidth,
int pHeight,
boolean pProportional,
OutputStream pScaledImage,
String pFormat)
throws IOException
InputStream.
pImage - the image streampWidth - the desired image heightpHeight - the desired image heightpProportional - true for proportional scaling and false for fixed scalingpScaledImage - the scaled image output streampFormat - the output format supported from image IO, e.g. png, jpg, gif
IOException - if an error occurs during image reading or writingImageIOpublic static ImageUtil.ImageFormat getImageFormat(byte[] pData)
pData - the image data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||