Package VASSAL.tools.image
Class ImageUtils
java.lang.Object
VASSAL.tools.image.ImageUtils
public class ImageUtils extends Object
-
Field Summary
Fields Modifier and Type Field Description protected static BufferedImagecompatOpaqueImageprotected static intcompatOpaqueImageTypeprotected static BufferedImagecompatTransImageprotected static intcompatTranslImageTypestatic StringGIF_SUFFIXstatic String[]IMAGE_SUFFIXESstatic StringJPEG_SUFFIXstatic StringJPG_SUFFIXstatic BufferedImageNULL_IMAGEstatic StringPNG_SUFFIXstatic StringSVG_SUFFIX -
Method Summary
-
Field Details
-
compatOpaqueImage
-
compatTransImage
-
compatOpaqueImageType
protected static final int compatOpaqueImageType -
compatTranslImageType
protected static final int compatTranslImageType -
NULL_IMAGE
-
GIF_SUFFIX
- See Also:
- Constant Field Values
-
PNG_SUFFIX
- See Also:
- Constant Field Values
-
SVG_SUFFIX
- See Also:
- Constant Field Values
-
JPG_SUFFIX
- See Also:
- Constant Field Values
-
JPEG_SUFFIX
- See Also:
- Constant Field Values
-
IMAGE_SUFFIXES
-
-
Method Details
-
getDefaultHints
-
transform
-
transform
-
transform
public static BufferedImage transform(BufferedImage src, double scale, double angle, RenderingHints hints) -
coerceToIntType
-
getBounds
- Parameters:
im-- Returns:
- the boundaries of this image, where (0,0) is the pseudo-center of the image
-
getBounds
-
getImageSize
- Throws:
ImageIOException
-
getImageResource
- Throws:
ImageIOException
-
getImage
- Throws:
ImageIOException
-
toType
-
forceLoad
-
isTransparent
-
isTransparent
-
toBufferedImage
Transform anImageto aBufferedImage.- Parameters:
src- theImageto transform
-
getCompatibleImageType
public static int getCompatibleImageType() -
getCompatibleTranslucentImageType
public static int getCompatibleTranslucentImageType() -
getCompatibleImageType
public static int getCompatibleImageType(boolean transparent) -
getCompatibleImageType
-
createCompatibleImage
-
createCompatibleImage
-
createCompatibleTranslucentImage
-
toCompatibleImage
-
isCompatibleImage
-
hasImageSuffix
-
stripImageSuffix
-