Interface IPromptImageConvertBuilder


  • public interface IPromptImageConvertBuilder
    A builder for a converter that can post-process images.
    Since:
    8.5.0
    • Method Detail

      • 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.