mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-18 16:31:44 +02:00
Bump version
This commit is contained in:
parent
64448d78ad
commit
7709b74a5e
@ -6,9 +6,9 @@ import (
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/metrics/prometheus"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/metrics/prometheus"
|
||||
)
|
||||
|
||||
type intSlice []int
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"bytes"
|
||||
"io"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
)
|
||||
|
||||
type Reader struct {
|
||||
|
@ -10,9 +10,9 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/version"
|
||||
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/version"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
func Int(i *int, name string) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/airbrake/gobrake/v5"
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
var notifier *gobrake.Notifier
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/bugsnag/bugsnag-go/v2"
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
var enabled bool
|
||||
|
@ -3,10 +3,10 @@ package errorreport
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/errorreport/airbrake"
|
||||
"github.com/imgproxy/imgproxy/v2/errorreport/bugsnag"
|
||||
"github.com/imgproxy/imgproxy/v2/errorreport/honeybadger"
|
||||
"github.com/imgproxy/imgproxy/v2/errorreport/sentry"
|
||||
"github.com/imgproxy/imgproxy/v3/errorreport/airbrake"
|
||||
"github.com/imgproxy/imgproxy/v3/errorreport/bugsnag"
|
||||
"github.com/imgproxy/imgproxy/v3/errorreport/honeybadger"
|
||||
"github.com/imgproxy/imgproxy/v3/errorreport/sentry"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/honeybadger-io/honeybadger-go"
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -10,9 +10,9 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/version"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/version"
|
||||
)
|
||||
|
||||
type eTagCalc struct {
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
4
go.mod
4
go.mod
@ -1,6 +1,6 @@
|
||||
module github.com/imgproxy/imgproxy/v2
|
||||
module github.com/imgproxy/imgproxy/v3
|
||||
|
||||
go 1.13
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
cloud.google.com/go/storage v1.15.0
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||
)
|
||||
|
||||
func healthcheck() int {
|
||||
|
@ -9,13 +9,13 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
|
||||
azureTransport "github.com/imgproxy/imgproxy/v2/transport/azure"
|
||||
fsTransport "github.com/imgproxy/imgproxy/v2/transport/fs"
|
||||
gcsTransport "github.com/imgproxy/imgproxy/v2/transport/gcs"
|
||||
s3Transport "github.com/imgproxy/imgproxy/v2/transport/s3"
|
||||
azureTransport "github.com/imgproxy/imgproxy/v3/transport/azure"
|
||||
fsTransport "github.com/imgproxy/imgproxy/v3/transport/fs"
|
||||
gcsTransport "github.com/imgproxy/imgproxy/v3/transport/gcs"
|
||||
s3Transport "github.com/imgproxy/imgproxy/v3/transport/s3"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -9,9 +9,9 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -3,12 +3,12 @@ package imagedata
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/bufpool"
|
||||
"github.com/imgproxy/imgproxy/v2/bufreader"
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v2/imagemeta"
|
||||
"github.com/imgproxy/imgproxy/v2/security"
|
||||
"github.com/imgproxy/imgproxy/v3/bufpool"
|
||||
"github.com/imgproxy/imgproxy/v3/bufreader"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/imagemeta"
|
||||
"github.com/imgproxy/imgproxy/v3/security"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"encoding/binary"
|
||||
"io"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
var bmpMagick = []byte("BM")
|
||||
|
@ -3,7 +3,7 @@ package imagemeta
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
func DecodeGifMeta(r io.Reader) (Meta, error) {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
const heifBoxHeaderSize = int64(8)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"encoding/binary"
|
||||
"io"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
type IcoMeta struct {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
type Meta interface {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"bufio"
|
||||
"io"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"encoding/binary"
|
||||
"io"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
var pngMagick = []byte("\x89PNG\r\n\x1a\n")
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"golang.org/x/text/encoding/charmap"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"encoding/binary"
|
||||
"io"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"golang.org/x/image/riff"
|
||||
"golang.org/x/image/vp8"
|
||||
"golang.org/x/image/vp8l"
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
logrus "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
||||
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||
)
|
||||
|
||||
func Init() error {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"log/syslog"
|
||||
"os"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
||||
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
20
main.go
20
main.go
@ -10,16 +10,16 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/errorreport"
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/logger"
|
||||
"github.com/imgproxy/imgproxy/v2/memory"
|
||||
"github.com/imgproxy/imgproxy/v2/metrics"
|
||||
"github.com/imgproxy/imgproxy/v2/metrics/prometheus"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/version"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/errorreport"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/logger"
|
||||
"github.com/imgproxy/imgproxy/v3/memory"
|
||||
"github.com/imgproxy/imgproxy/v3/metrics"
|
||||
"github.com/imgproxy/imgproxy/v3/metrics/prometheus"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/version"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func initialize() error {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func LogStats() {
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext"
|
||||
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/version"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/version"
|
||||
)
|
||||
|
||||
type spanCtxKey struct{}
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/metrics/datadog"
|
||||
"github.com/imgproxy/imgproxy/v2/metrics/newrelic"
|
||||
"github.com/imgproxy/imgproxy/v2/metrics/prometheus"
|
||||
"github.com/imgproxy/imgproxy/v3/metrics/datadog"
|
||||
"github.com/imgproxy/imgproxy/v3/metrics/newrelic"
|
||||
"github.com/imgproxy/imgproxy/v3/metrics/prometheus"
|
||||
)
|
||||
|
||||
func Init() error {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/newrelic/go-agent/v3/newrelic"
|
||||
)
|
||||
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/reuseport"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/reuseport"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
@ -11,11 +11,11 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/structdiff"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/structdiff"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
const maxClientHintDPR = 8
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
type ProcessingOptionsTestSuite struct{ suite.Suite }
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
const urlTokenPlain = "plain"
|
||||
|
@ -1,10 +1,10 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func applyFilters(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
)
|
||||
|
||||
func calcPosition(width, height, innerWidth, innerHeight int, gravity *options.GravityOptions, allowOverflow bool) (left, top int) {
|
||||
|
@ -3,8 +3,8 @@ package processing
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/router"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/router"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func copyMemoryAndCheckTimeout(ctx context.Context, img *vips.Image) error {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func cropImage(img *vips.Image, cropWidth, cropHeight int, gravity *options.GravityOptions) error {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func exportColorProfile(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func extend(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func finalize(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -1,11 +1,11 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func flatten(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func importColorProfile(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func padding(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -3,10 +3,10 @@ package processing
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
type pipelineContext struct {
|
||||
|
@ -3,11 +3,11 @@ package processing
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func extractMeta(img *vips.Image, baseAngle int, useOrientation bool) (int, int, int, bool) {
|
||||
|
@ -7,14 +7,14 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/router"
|
||||
"github.com/imgproxy/imgproxy/v2/security"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/router"
|
||||
"github.com/imgproxy/imgproxy/v3/security"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
var mainPipeline = pipeline{
|
||||
|
@ -1,9 +1,9 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func rotateAndFlip(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func scale(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -3,12 +3,12 @@ package processing
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func canScaleOnLoad(imgtype imagetype.Type, scale float64) bool {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package processing
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
func trim(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error {
|
||||
|
@ -3,11 +3,11 @@ package processing
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imath"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imath"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
var watermarkPipeline = pipeline{
|
||||
|
@ -10,18 +10,18 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/errorreport"
|
||||
"github.com/imgproxy/imgproxy/v2/etag"
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/metrics"
|
||||
"github.com/imgproxy/imgproxy/v2/options"
|
||||
"github.com/imgproxy/imgproxy/v2/processing"
|
||||
"github.com/imgproxy/imgproxy/v2/router"
|
||||
"github.com/imgproxy/imgproxy/v2/security"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/errorreport"
|
||||
"github.com/imgproxy/imgproxy/v3/etag"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/metrics"
|
||||
"github.com/imgproxy/imgproxy/v3/options"
|
||||
"github.com/imgproxy/imgproxy/v3/processing"
|
||||
"github.com/imgproxy/imgproxy/v3/router"
|
||||
"github.com/imgproxy/imgproxy/v3/security"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -10,13 +10,13 @@ import (
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/config/configurators"
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imagemeta"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/router"
|
||||
"github.com/imgproxy/imgproxy/v2/vips"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config/configurators"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imagemeta"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/router"
|
||||
"github.com/imgproxy/imgproxy/v3/vips"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
func Listen(network, address string) (net.Listener, error) {
|
||||
|
@ -3,7 +3,7 @@ package router
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v2/metrics"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/metrics"
|
||||
)
|
||||
|
||||
type timerSinceCtxKey = struct{}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package security
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
)
|
||||
|
||||
var ErrSourceResolutionTooBig = ierrors.New(422, "Source image resolution is too big", "Invalid source image")
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
type SignatureTestSuite struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package security
|
||||
|
||||
import (
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
func VerifySourceURL(imageURL string) bool {
|
||||
|
10
server.go
10
server.go
@ -10,11 +10,11 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/netutil"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/errorreport"
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v2/reuseport"
|
||||
"github.com/imgproxy/imgproxy/v2/router"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/errorreport"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/reuseport"
|
||||
"github.com/imgproxy/imgproxy/v3/router"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/Azure/azure-storage-blob-go/azblob"
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
type transport struct {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"io/fs"
|
||||
"net/http"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
type transport struct {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"cloud.google.com/go/storage"
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"google.golang.org/api/option"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
)
|
||||
|
||||
// transport implements RoundTripper for the 's3' protocol.
|
||||
|
@ -1,6 +1,6 @@
|
||||
package version
|
||||
|
||||
const version = "2.16.5"
|
||||
const version = "3.0.0.beta1"
|
||||
|
||||
func Version() string {
|
||||
return version
|
||||
|
@ -11,9 +11,9 @@ import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imagemeta"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imagemeta"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
)
|
||||
|
||||
func (img *Image) loadIco(data []byte, shrink int, scale float64, pages int) error {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package vips
|
||||
|
||||
import "github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
import "github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
|
||||
func DisableLoadSupport(it imagetype.Type) {
|
||||
typeSupportLoad[it] = false
|
||||
|
10
vips/vips.go
10
vips/vips.go
@ -17,11 +17,11 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v2/config"
|
||||
"github.com/imgproxy/imgproxy/v2/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v2/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v2/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v2/metrics/prometheus"
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/ierrors"
|
||||
"github.com/imgproxy/imgproxy/v3/imagedata"
|
||||
"github.com/imgproxy/imgproxy/v3/imagetype"
|
||||
"github.com/imgproxy/imgproxy/v3/metrics/prometheus"
|
||||
)
|
||||
|
||||
type Image struct {
|
||||
|
Loading…
Reference in New Issue
Block a user