All Superinterfaces:
JsonConvertible
All Known Implementing Classes:
ImageEncoderJPG, ImageEncoderPNG

public interface ImageEncoder extends JsonConvertible
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 Details

    • saveImage

      void saveImage(BufferedImage image, File target)
      Saves a BufferedImage to a specified File.
      Parameters:
      image - the image to be saved
      target - 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.