Package app.YUP.utils

Class ImageConverter

java.lang.Object
app.YUP.utils.ImageConverter

public class ImageConverter extends Object
Utility class for converting BufferedImage to Base64 string. This class cannot be instantiated.
  • Method Details

    • convertToBase64

      public static String convertToBase64(BufferedImage image) throws IOException
      Converts a BufferedImage to a Base64 string.
      Parameters:
      image - the BufferedImage to be converted.
      Returns:
      a Base64 string representation of the image.
      Throws:
      IOException - if an error occurs during writing to the ByteArrayOutputStream.