Package VASSAL.tools.image
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
FieldsModifier and TypeFieldDescriptionprotected ImageTypeConverterprotected ImageTypeConverterprotected TemporaryFileFactory -
Constructor Summary
ConstructorsConstructorDescriptionFallbackImageTypeConverter(TemporaryFileFactory tfactory)Create 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:
convertin interfaceImageTypeConverter- Parameters:
ref- a holder for the imagetype- the type of image to return- Returns:
- a converted image
- Throws:
ImageIOException- if something goes wrong
-