Class ImageUtils
java.lang.Object
VASSAL.tools.image.ImageUtils
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final BufferedImage
protected static final int
protected static final BufferedImage
protected static final int
static final String
static final String[]
static final String
static final String
static final BufferedImage
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
static BufferedImage
createCompatibleImage
(int w, int h) static BufferedImage
createCompatibleImage
(int w, int h, boolean transparent) static BufferedImage
createCompatibleTranslucentImage
(int w, int h) static Image
static Rectangle
static Rectangle
static int
static int
getCompatibleImageType
(boolean transparent) static int
static int
static RenderingHints
static BufferedImage
getImage
(String name, InputStream in) static BufferedImage
getImageResource
(String name) static Dimension
getImageSize
(String name, InputStream in) static boolean
hasImageSuffix
(String name) static boolean
static boolean
isTransparent
(Image img) static boolean
static String
stripImageSuffix
(String name) static BufferedImage
toBufferedImage
(Image src) Transform anImage
to aBufferedImage
.static BufferedImage
static BufferedImage
toType
(BufferedImage src, int type) static BufferedImage
transform
(BufferedImage src, double scale, double angle) static BufferedImage
transform
(BufferedImage src, double scale, double angle, RenderingHints hints) static BufferedImage
transform
(BufferedImage src, int sw, int sh, RenderingHints hints) static Rectangle
-
Field Details
-
compatOpaqueImage
-
compatTransImage
-
compatOpaqueImageType
protected static final int compatOpaqueImageType -
compatTranslImageType
protected static final int compatTranslImageType -
NULL_IMAGE
-
GIF_SUFFIX
- See Also:
-
PNG_SUFFIX
- See Also:
-
SVG_SUFFIX
- See Also:
-
JPG_SUFFIX
- See Also:
-
JPEG_SUFFIX
- See Also:
-
IMAGE_SUFFIXES
-
-
Method Details
-
getDefaultHints
-
transform
-
transform
-
transform
public static BufferedImage transform(BufferedImage src, double scale, double angle, RenderingHints hints) -
transform
-
coerceToIntType
-
getBounds
- Parameters:
im
- Image- 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 anImage
to aBufferedImage
.- Parameters:
src
- theImage
to 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
-