|
kiyut.citra 2.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkiyut.citra.util.ImageUtilities
public class ImageUtilities
Image utilitis class. It provides provides static methods for manipulating Images
| Constructor Summary | |
|---|---|
ImageUtilities()
|
|
| Method Summary | |
|---|---|
static BufferedImage |
createImageARGB(Image src,
boolean copy)
Returns a BufferedImage with type ARGB based on the supplied source image |
static BufferedImage |
createImageARGB(int width,
int height)
Returns a BufferedImage with type ARGB based on the supplied param |
static String |
getFileSuffix(File file)
Return file suffix portion of give file. |
static BufferedImage |
getScaledInstance(BufferedImage img,
int w,
int h,
boolean autoHint,
boolean scaleFit)
Return a scaled instance of the provided BufferedImage. |
static BufferedImage |
getScaledInstance(BufferedImage img,
int w,
int h,
Object hint)
Return a scaled instance of the provided BufferedImage. |
static BufferedImage |
getScaledInstance(BufferedImage img,
int width,
int height,
Object hint,
boolean scaleFit)
Return a scaled instance of the provided BufferedImage. |
static BufferedImage |
iconToBufferedImage(Icon icon)
Returns a BufferedImage representation of the icon. |
static boolean |
isFileImage(File file)
Return whether the file is a known image file or not It is use ImageIO to determine the file type |
static double |
scaleToFit(Dimension src,
Dimension dest)
Return the scale value from src to dest proportionally |
| 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 BufferedImage getScaledInstance(BufferedImage img,
int w,
int h,
Object hint)
BufferedImage.
Only a wrapper for getScaledInstance(BufferedImage,int,int,Object,false)
img - the original image to be scaledw - target widthh - target heighthint - one of the rendering hints that corresponds to
RenderingHints.KEY_INTERPOLATION (e.g.
RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR,
RenderingHints.VALUE_INTERPOLATION_BILINEAR,
RenderingHints.VALUE_INTERPOLATION_BICUBIC)
BufferedImagegetScaledInstance(BufferedImage,int,int,boolean,boolean),
getScaledInstance(BufferedImage,int,int,Object,boolean)
public static BufferedImage getScaledInstance(BufferedImage img,
int w,
int h,
boolean autoHint,
boolean scaleFit)
BufferedImage.
img - the imagewidth - target widthheight - target heightautoHint - if scale factor > 0.5 use bicubic else use default.scaleFit - scale the image proportionally to fit the supplied width & height
if the image is smaller than width and height then nothing change
BufferedImagegetScaledInstance(BufferedImage,int,int,Object),
getScaledInstance(BufferedImage,int,int,Object,boolean)
public static BufferedImage getScaledInstance(BufferedImage img,
int width,
int height,
Object hint,
boolean scaleFit)
BufferedImage.
img - the imagewidth - target widthheight - target heighthint - one of the rendering hints that corresponds to
RenderingHints.KEY_INTERPOLATION (e.g.
RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR,
RenderingHints.VALUE_INTERPOLATION_BILINEAR,
RenderingHints.VALUE_INTERPOLATION_BICUBIC)scaleFit - scale the image proportionally to fit the supplied width & height
if the image is smaller than width and height then nothing change
BufferedImagegetScaledInstance(BufferedImage,int,int,Object),
getScaledInstance(BufferedImage,int,int,boolean,boolean),
scaleToFit(Dimension,Dimension)
public static double scaleToFit(Dimension src,
Dimension dest)
src to dest proportionally
src - source dimensiondest - destination dimension
public static boolean isFileImage(File file)
ImageIO to determine the file type
file - the file to be queried
public static String getFileSuffix(File file)
file - the file to be queried
public static BufferedImage iconToBufferedImage(Icon icon)
BufferedImage representation of the icon.
icon - the icon
BufferedImage representation of the icon
public static BufferedImage createImageARGB(Image src,
boolean copy)
BufferedImage with type ARGB based on the supplied source image
src - Imagecopy - if true copy the content of the source
BufferedImage
public static BufferedImage createImageARGB(int width,
int height)
BufferedImage with type ARGB based on the supplied param
width - the widthheight - the height
BufferedImage
|
kiyut.citra 2.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||