|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcontrib.com.blogofbug.utility.ImageUtilities
public class ImageUtilities
Static class with utility methods for images
| Constructor Summary | |
|---|---|
ImageUtilities()
|
|
| Method Summary | |
|---|---|
static java.awt.image.BufferedImage |
copyImage(java.awt.image.BufferedImage image)
Produces a copy of the supplied image |
static java.awt.image.BufferedImage |
createCompatibleImage(int width,
int height)
Creates an image compatible with the current display |
static java.awt.image.BufferedImage |
loadCompatibleImage(java.lang.String imageURL)
Loads an image in a format compatible with the current display |
static java.awt.image.BufferedImage |
renderComponentToImage(javax.swing.JComponent component)
Renders a component into an image, which is useful for playing with the component's resultant image in special effects or transitions |
static java.awt.image.BufferedImage |
renderTextToImage(java.awt.Font font,
java.awt.Color textColor,
java.lang.String[] text,
int width)
Renders multiple paragraphs of text in an array to an image (created and returned). |
static java.awt.image.BufferedImage |
renderTextToImage(java.awt.Font font,
java.awt.Color textColor,
java.lang.String text,
int width)
Renders a paragraph of text (line breaks ignored) to an image (created and returned). |
static java.awt.image.BufferedImage |
scaledImage(java.awt.image.BufferedImage image,
int width,
int height)
Produces a resized image that is of the given dimensions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageUtilities()
| Method Detail |
|---|
public static java.awt.image.BufferedImage createCompatibleImage(int width,
int height)
public static java.awt.image.BufferedImage loadCompatibleImage(java.lang.String imageURL)
public static java.awt.image.BufferedImage scaledImage(java.awt.image.BufferedImage image,
int width,
int height)
image - The original imagewidth - The desired widthheight - The desired height
public static java.awt.image.BufferedImage copyImage(java.awt.image.BufferedImage image)
image - The original image
public static java.awt.image.BufferedImage renderTextToImage(java.awt.Font font,
java.awt.Color textColor,
java.lang.String text,
int width)
font - The font to usetextColor - The color of the texttext - The messagewidth - The width the text should be limited to
public static java.awt.image.BufferedImage renderTextToImage(java.awt.Font font,
java.awt.Color textColor,
java.lang.String[] text,
int width)
font - The font to usetextColor - The color of the texttext - The message in an array of strings (one paragraph in eachwidth - The width the text should be limited to
public static java.awt.image.BufferedImage renderComponentToImage(javax.swing.JComponent component)
component - The component to render
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||