Class ImageEncodingDecodingTests

java.lang.Object
test.de.iip_ecosphere.platform.kiServices.functions.images.ImageEncodingDecodingTests

public class ImageEncodingDecodingTests extends Object
A class dedicated to testing the methods of ImageEndiginDecoding.
Author:
Weber
  • Field Details

  • Constructor Details

    • ImageEncodingDecodingTests

      public ImageEncodingDecodingTests()
  • Method Details

    • testReadImageToBase64String

      public static String testReadImageToBase64String()
      Tests the method to read in an image as a base64 string. Returns the string.
      Returns:
      the converted image.
    • testReadingInImageAsBufferedImage

      public static BufferedImage testReadingInImageAsBufferedImage()
      Tests the method to read in an image as a bufferedImage and returns that.
      Returns:
      The image as BufferedImage or null if it cannot be read.
    • testReadingBase64AsString

      public static String testReadingBase64AsString()
      Tests if a base64 String can be read in from a base64 file as used in this project.
      Returns:
      the string from the file. It will be empty if the file cannot be read properly.
    • testReadBase64StringAsBufferedImage

      public static BufferedImage testReadBase64StringAsBufferedImage()
      Tests if a base64 file can be read and output as a BufferedImage.
      Returns:
      image the buffered image derived from the input string.
    • testBufferedImageToBase64

      public static String testBufferedImageToBase64()
      Tests the conversion of bufferedImages to base64 Strings. Firstly reads in an imgae, converts it and tried to revert that.
      Returns:
      The image string.
    • main

      public static void main(String[] args)
      Testing main method.
      Parameters:
      args - args.