Class SupportedFormats

java.lang.Object
com.idrsolutions.image.utility.SupportedFormats

public final class SupportedFormats extends Object
  • Method Details

    • getEncoder

      public static com.idrsolutions.image.Encoder getEncoder(OutputFormat format, EncoderOptions options)
    • getEncoderOptions

      public static EncoderOptions getEncoderOptions(OutputFormat format)
    • getSupportedImageEncoders

      public static String[][] getSupportedImageEncoders()
      List of file formats by file suffix of image formats which can be encoded
      Returns:
      String[] with all supported file ending formats (ie new String[][]{{"bmp"},{"heic", "heif"}, {"jpeg", "jpg"},{"jpx"},{"png"},{"tif", "tiff"},{"webp"}}
    • getSupportedImageDecoders

      public static String[][] getSupportedImageDecoders()
      List of file formats by file suffix of image formats which can be decoded
      Returns:
      String[] with all supported file ending formats (ie new String[][]{{"bmp"},{"gif"},{"heic"},{"jpx", "jp2"},{"jpeg", "jpg"},{"png"},{"tif", "tiff"}};
    • getSupportedImageMetadatas

      public static String[][] getSupportedImageMetadatas()
    • hasEncoderSupportForImageFormat

      public static boolean hasEncoderSupportForImageFormat(String format)
      return true if images can be encoded to the format of this suffix (ie png)
      Parameters:
      format - three letter image prefix
      Returns:
      value to show if image can be written by jdeli
    • hasDecoderSupportForImageFormat

      public static boolean hasDecoderSupportForImageFormat(String format)
      return true if image files ending with this suffix (ie png) can be Decoded
      Parameters:
      format - three letter image prefix
      Returns:
      value to show if image can be read by jdeli
    • getEnumFromString

      public static OutputFormat getEnumFromString(String format)
      take case insensitive file ending and return the OutputFormat Enum or null if value not found
      Parameters:
      format - three letter image prefix
      Returns:
      OutputFormat possible suffices for support image or null
    • getInputEnumFromString

      public static ImageFormat getInputEnumFromString(String format)
      take case insensitive file ending and return the ImageFormat Enum or null if value not found
      Parameters:
      format - three letter image prefix
      Returns:
      ImageFormat possible suffices for support image or null
    • getInputStringFromEnum

      public static String getInputStringFromEnum(ImageFormat imageFormat)
      take ImageFormat and return the String format or an empty sting if not supported
      Parameters:
      imageFormat - format enum
      Returns:
      String format string or empty string if not supported
    • getEncoderOptions

      public static EncoderOptions getEncoderOptions(ImageWriteParam param, OutputFormat output)
      Get the formats encoder options with the compression quality set using ImageWriteParams
      Parameters:
      output - OutputFormat
      param - ImageWriteParam
      Returns:
      EncoderOptions