Documentation
¶
Overview ¶
Package resize provides methods for running a base image transformation application that can be imported alongside custom `transform.Transformation` and `gocloud.dev/blob` packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFlagSet ¶
DefaultFlagSet returns a `flag.FlagSet` instance configured with the default flags for running an image transformation application.
func RunWithFlagSet ¶
Run invokes the image transformation application using a custom `flag.FlagSet` instance.
func RunWithOptions ¶
func RunWithOptions(ctx context.Context, opts *RunOptions, paths ...string) error
Run invokes the image transformation application configured using 'opts'.
Types ¶
type RunOptions ¶
type RunOptions struct {
// TranformationURIs is one or more `transform.Tranformation` URIs used to apply transformations to an image.
TransformationURIs []string
// SourceURI is a `gocloud.dev/blob.Bucket` URI specifying the location where images are read from.
SourceURI string
// SourceURI is a `gocloud.dev/blob.Bucket` URI specifying the location where images are written to.
TargetURI string
// ApplySuffix is an optional suffix to apply to the final image filename.
ApplySuffix string
// ImageFormat is an optional image format used to encode the final image.
ImageFormat string
// Logger is a `log.Logger` instance used for logging messages and feedback.
Logger *log.Logger
}
RunOptions is a struct containing configuration details for running an image transformation application.
Click to show internal directories.
Click to hide internal directories.