mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 20:22:31 +02:00
ProcessingOptionsFactory in processing and watermark
This commit is contained in:
@@ -19,6 +19,8 @@ type pipelineContext struct {
|
||||
// The watermark image provider, if any watermarking is to be done.
|
||||
watermarkProvider auximageprovider.Provider
|
||||
|
||||
processingOptionsFactory *options.Factory
|
||||
|
||||
trimmed bool
|
||||
|
||||
srcWidth int
|
||||
@@ -77,6 +79,7 @@ func (p pipeline) Run(
|
||||
po *options.ProcessingOptions,
|
||||
imgdata imagedata.ImageData,
|
||||
watermark auximageprovider.Provider,
|
||||
processingOptionsFactory *options.Factory,
|
||||
) error {
|
||||
pctx := pipelineContext{
|
||||
ctx: ctx,
|
||||
@@ -87,8 +90,9 @@ func (p pipeline) Run(
|
||||
dprScale: 1.0,
|
||||
vectorBaseScale: 1.0,
|
||||
|
||||
cropGravity: po.Crop.Gravity,
|
||||
watermarkProvider: watermark,
|
||||
cropGravity: po.Crop.Gravity,
|
||||
watermarkProvider: watermark,
|
||||
processingOptionsFactory: processingOptionsFactory,
|
||||
}
|
||||
|
||||
if pctx.cropGravity.Type == options.GravityUnknown {
|
||||
|
Reference in New Issue
Block a user