Interface PromptImageFormatConverterFactory


public interface PromptImageFormatConverterFactory
Internal interface with the implementation of the factory methods from PromptImageFormatConverters, i.e. the factory implementation for common image format converters.
Since:
8.5.0
  • Method Details

    • convertToFormat

      IPromptImageFormatConverter convertToFormat(String format)
      Creates an image format converter that always changes the image format to the given target format.
      Parameters:
      format - The target format, e.g. "png" or "jpeg".
      Returns:
      The converter.
    • ensureFormat

      Creates an image format converter that ensures the image is in one of the given formats. If the image is already in one of the given formats, the format is preserved; otherwise, the image format is changed to the first of the given formats.
      Parameters:
      formats - The allowed formats, e.g. "png" or "jpeg".
      Returns:
      The converter.