From f549b9420b7e486b2dc89d605215f40c895652b8 Mon Sep 17 00:00:00 2001 From: Vaibhav Sharma Date: Wed, 16 Feb 2022 16:43:51 +0530 Subject: [PATCH 1/2] allow speed from get --- options.go | 2 ++ params.go | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/options.go b/options.go index b69fb881..bc639c59 100644 --- a/options.go +++ b/options.go @@ -44,6 +44,7 @@ type ImageOptions struct { Color []uint8 Background []uint8 Interlace bool + Speed int Extend bimg.Extend Gravity bimg.Gravity Colorspace bimg.Interpretation @@ -144,6 +145,7 @@ func BimgOptions(o ImageOptions) bimg.Options { Rotate: bimg.Angle(o.Rotate), Interlace: o.Interlace, Palette: o.Palette, + Speed: o.Speed, } if len(o.Background) != 0 { diff --git a/params.go b/params.go index ddc200e4..8d133b7b 100644 --- a/params.go +++ b/params.go @@ -56,6 +56,7 @@ var paramTypeCoercions = map[string]Coercion{ "interlace": coerceInterlace, "aspectratio": coerceAspectRatio, "palette": coercePalette, + "speed": coerceSpeed, } func coerceTypeInt(param interface{}) (int, error) { @@ -350,6 +351,11 @@ func coercePalette(io *ImageOptions, param interface{}) (err error) { return err } +func coerceSpeed(io *ImageOptions, param interface{}) (err error) { + io.Speed, err = coerceTypeInt(param) + return err +} + func buildParamsFromOperation(op PipelineOperation) (ImageOptions, error) { var options ImageOptions From 3c9eafebdf766ed9da2bbd430cf7d84661f5bc72 Mon Sep 17 00:00:00 2001 From: Vaibhav Sharma Date: Wed, 16 Feb 2022 16:56:09 +0530 Subject: [PATCH 2/2] updating the version to use effor param in libvips --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3f33d2e7..1f2d697c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG GOLANG_VERSION=1.17 FROM golang:${GOLANG_VERSION}-buster as builder ARG IMAGINARY_VERSION=dev -ARG LIBVIPS_VERSION=8.10.0 +ARG LIBVIPS_VERSION=8.12.2 ARG GOLANGCILINT_VERSION=1.29.0 # Installs libvips + required libraries