Class FallbackImageTypeConverter
java.lang.Object
VASSAL.tools.image.FallbackImageTypeConverter
- All Implemented Interfaces:
ImageTypeConverter
Convert a
BufferedImage
to a different type, falling back to
conversion on disk if conversion in memory fails.- Since:
- 3.2.0
- Author:
- Joel Uckelman
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ImageTypeConverter
protected final ImageTypeConverter
protected final TemporaryFileFactory
-
Constructor Summary
ConstructorDescriptionCreate a converter. -
Method Summary
Modifier and TypeMethodDescriptionconvert
(Reference<BufferedImage> ref, int type) Converts an image to the given type.
-
Field Details
-
tfactory
-
memory_converter
-
file_converter
-
-
Constructor Details
-
FallbackImageTypeConverter
Create a converter.- Parameters:
tfactory
- the temporary file factory
-
-
Method Details
-
convert
Converts an image to the given type.- Specified by:
convert
in interfaceImageTypeConverter
- Parameters:
ref
- a holder for the imagetype
- the type of image to return- Returns:
- a converted image
- Throws:
ImageIOException
- if something goes wrong
-