|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.util.ImageUtils
public class ImageUtils
Utility methods for image manipulation.
| Constructor Summary | |
|---|---|
ImageUtils()
|
|
| Method Summary | |
|---|---|
static BufferedImage |
getBufferedImage(Image source)
Returns the buffered image corresponding to the given image |
static BufferedImage |
getBufferedImage(URL imagePath)
Returns the buffered image corresponding to the given url image path. |
static Image |
getBytesInImage(byte[] imageBytes)
Loads an image from a given bytes array. |
static byte[] |
getScaledInstanceInBytes(Image image,
int width,
int height)
Returns a scaled instance of the given image. |
static ImageIcon |
getScaledRoundedIcon(byte[] imageBytes,
int width,
int height)
Creates a rounded corner scaled image. |
static ImageIcon |
getScaledRoundedIcon(Image image,
int width,
int height)
Returns a scaled rounded icon from the given image, scaled within the given width and height. |
static Image |
getScaledRoundedImage(Image image,
int width,
int height)
Creates a rounded avatar image. |
static ImageIcon |
scaleIconWithinBounds(Image image,
int width,
int height)
Scales the given image to fit in the given width and height. |
static ImageIcon |
scaleImageWithinBounds(byte[] imageBytes,
int width,
int height)
Scales the given image to fit in the given width and height. |
static Image |
scaleImageWithinBounds(Image image,
int width,
int height)
Returns a scaled image fitting within the given bounds while keeping the aspect ratio. |
static byte[] |
toByteArray(BufferedImage image)
Extracts bytes from image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageUtils()
| Method Detail |
|---|
public static Image scaleImageWithinBounds(Image image,
int width,
int height)
image - the image to scalewidth - maximum width of the scaled imageheight - maximum height of the scaled image
public static ImageIcon scaleIconWithinBounds(Image image,
int width,
int height)
image - the image to scalewidth - the desired widthheight - the desired height
public static ImageIcon scaleImageWithinBounds(byte[] imageBytes,
int width,
int height)
imageBytes - the bytes of the image to scalewidth - the desired widthheight - the desired height
public static Image getScaledRoundedImage(Image image,
int width,
int height)
image - image of the initial avatar image.width - the desired widthheight - the desired height
public static byte[] getScaledInstanceInBytes(Image image,
int width,
int height)
image - the image to scalewidth - the desired widthheight - the desired height
public static ImageIcon getScaledRoundedIcon(Image image,
int width,
int height)
image - the image to scalewidth - the maximum width of the scaled iconheight - the maximum height of the scaled icon
public static ImageIcon getScaledRoundedIcon(byte[] imageBytes,
int width,
int height)
imageBytes - The bytes of the image to be scaled.width - The maximum width of the scaled image.height - The maximum height of the scaled image.
public static BufferedImage getBufferedImage(URL imagePath)
imagePath - the path indicating, where we can find the image.
public static BufferedImage getBufferedImage(Image source)
source - an image
public static byte[] toByteArray(BufferedImage image)
image - the image.
public static Image getBytesInImage(byte[] imageBytes)
imageBytes - The bytes array to load the image from.
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||