Interface PromptImageFormatConverterFactory
-
public interface PromptImageFormatConverterFactoryInternal interface with the implementation of the factory methods fromPromptImageFormatConverters, i.e. the factory implementation for common image format converters.- Since:
- 8.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IPromptImageFormatConverterconvertToFormat(String format)Creates an image format converter that always changes the image format to the given target format.IPromptImageFormatConverterensureFormat(Iterable<String> formats)Creates an image format converter that ensures the image is in one of the given formats.
-
-
-
Method Detail
-
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
IPromptImageFormatConverter ensureFormat(Iterable<String> formats)
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.
-
-