Interface IPromptImageConvertBuilder
-
public interface IPromptImageConvertBuilderA builder for a converter that can post-process images.- Since:
- 8.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IPromptImageConvertBuilderalphaChannel(IPromptImageAlphaChannelConverter converter)Adjusts the alpha channel of the image using the given converter.IPromptImageConvertBuilderbackgroundColor(RgbaQuadruplet backgroundColor)Sets the background color of the image, used as a default color for pixels, e.g. when the source image has transparency or when the image is resized and the canvas is larger than the image.IPromptImageConvertBuilderbackgroundColor(RgbTriplet backgroundColor)Sets the background color of the image, used as a default color for pixels, e.g. when the source image has transparency or when the image is resized and the canvas is larger than the image.IPromptImageConverterbuild()Builds a new converter for post-processing images, using the current builder configuration.IPromptImageConvertBuildercompression(double compression)Sets the compression level of the image if needed, e.g. for JPEG images.IPromptImageConvertBuilderformat(IPromptImageFormatConverter converter)Transforms the output format of the image using the given converter, e.g. to "png" or "jpeg".IPromptImageConvertBuildergeometry(IPromptImageGeometryConverter converter)Changes the geometry of the image using the given converter.
-
-
-
Method Detail
-
alphaChannel
@CanIgnoreReturnValue IPromptImageConvertBuilder alphaChannel(IPromptImageAlphaChannelConverter converter)
Adjusts the alpha channel of the image using the given converter.- Parameters:
converter- The converter.- Returns:
- The builder.
- See Also:
PromptImageAlphaChannelConverters
-
backgroundColor
@CanIgnoreReturnValue IPromptImageConvertBuilder backgroundColor(RgbaQuadruplet backgroundColor)
Sets the background color of the image, used as a default color for pixels, e.g. when the source image has transparency or when the image is resized and the canvas is larger than the image.- Parameters:
backgroundColor- The background color.- Returns:
- The builder.
-
backgroundColor
@CanIgnoreReturnValue IPromptImageConvertBuilder backgroundColor(RgbTriplet backgroundColor)
Sets the background color of the image, used as a default color for pixels, e.g. when the source image has transparency or when the image is resized and the canvas is larger than the image.- Parameters:
backgroundColor- The background color.- Returns:
- The builder.
-
build
IPromptImageConverter build()
Builds a new converter for post-processing images, using the current builder configuration.- Returns:
- The converter.
-
compression
@CanIgnoreReturnValue IPromptImageConvertBuilder compression(double compression)
Sets the compression level of the image if needed, e.g. for JPEG images.- Parameters:
compression- The compression level, between 0.0 (lowest quality, highest compression) and 1.0 (highest quality, lowest compression).- Returns:
- The builder.
-
format
@CanIgnoreReturnValue IPromptImageConvertBuilder format(IPromptImageFormatConverter converter)
Transforms the output format of the image using the given converter, e.g. to "png" or "jpeg". When not set, the original format is preserved.- Parameters:
converter- The converter.- Returns:
- The builder.
- See Also:
PromptImageFormatConverters
-
geometry
@CanIgnoreReturnValue IPromptImageConvertBuilder geometry(IPromptImageGeometryConverter converter)
Changes the geometry of the image using the given converter. SeePromptImageGeometryConvertersfor various common converters.- Parameters:
converter- The converters.- Returns:
- The builder.
- See Also:
PromptImageGeometryConverters
-
-