From 116ccc29e8c0262c112f77769a71ec32c07d1a1c Mon Sep 17 00:00:00 2001 From: DarthSim Date: Mon, 17 Jun 2019 16:15:10 +0600 Subject: [PATCH] expand => extend --- process.go | 2 +- processing_options.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/process.go b/process.go index 3f3f6a6d..a3407011 100644 --- a/process.go +++ b/process.go @@ -329,7 +329,7 @@ func transformImage(ctx context.Context, img *vipsImage, data []byte, po *proces } } - if po.Expand && (po.Width > img.Width() || po.Height > img.Height()) { + if po.Extend && (po.Width > img.Width() || po.Height > img.Height()) { if err = img.Embed(gravityCenter, po.Width, po.Height, 0, 0, po.Background); err != nil { return err } diff --git a/processing_options.go b/processing_options.go index b7208f17..b3c5e67c 100644 --- a/processing_options.go +++ b/processing_options.go @@ -103,7 +103,7 @@ type processingOptions struct { Dpr float64 Gravity gravityOptions Enlarge bool - Expand bool + Extend bool Crop cropOptions Format imageType Quality int @@ -316,10 +316,10 @@ func applyEnlargeOption(po *processingOptions, args []string) error { func applyExtendOption(po *processingOptions, args []string) error { if len(args) > 1 { - return fmt.Errorf("Invalid expand arguments: %v", args) + return fmt.Errorf("Invalid extend arguments: %v", args) } - po.Expand = args[0] != "0" + po.Extend = args[0] != "0" return nil }