Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Upscaler ¶
type Upscaler struct {
// contains filtered or unexported fields
}
Upscaler wraps an external executable that can upscale images. It can be reused multiple times with the same parameters.
func New ¶
New returns a new upscaler that will use the provided executable. If the provided executable is empty, it will use the default embedded python script.
func (*Upscaler) Process ¶
Process will apply the configured operations to the source image and create the destination image.
func (*Upscaler) SetDenoise ¶
SetDenoise sets whether denoising is to be done on the image. It's possible that a particular upscaler may not support this.
func (*Upscaler) SetMinRes ¶
SetMinRes specifies the resolution to target using the "fill container" strategy. After scaling the image's width AND height will BOTH be at least the width or height specified. If either width or height is zero, they will be ignored. This unsets the scale setting.
func (*Upscaler) SetScale ¶
SetScale sets the multiplication factor that will be applied to all the dimensions of the image. This unsets the target resolution.
func (*Upscaler) SetTargetRes ¶
SetTargetRes specifies the resolution to target using the "fit to container" strategy. After scaling the image's width OR height will be at least the width or height specified. If either width or height is zero, they will be ignored. This unsets the scale setting.