Interface ImageEncoder
- All Superinterfaces:
JsonConvertible
- All Known Implementing Classes:
ImageEncoderJPG,ImageEncoderPNG
Interface for encoding and saving images.
Implementing classes must provide methods for saving a BufferedImage to a File,
and returning the file extension of the encoded image.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the file extension of the encoded image.voidsaveImage(BufferedImage image, File target) Saves aBufferedImageto a specifiedFile.Methods inherited from interface one.jpro.platform.image.manager.JsonConvertible
toJSON
-
Method Details
-
saveImage
Saves aBufferedImageto a specifiedFile.- Parameters:
image- the image to be savedtarget- the target file to save the image
-
getFileExtension
String getFileExtension()Returns the file extension of the encoded image.- Returns:
- The file extension as a string.
-