From 9a67ea746de9b6783511fc1e944850f5976b7d22 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Mon, 5 Jun 2017 17:08:16 +0200 Subject: [PATCH] mediaapi/thumbnailer: Use math.Inf() for max aspect and size --- .../matrix-org/dendrite/mediaapi/thumbnailer/thumbnailer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/mediaapi/thumbnailer/thumbnailer.go b/src/github.com/matrix-org/dendrite/mediaapi/thumbnailer/thumbnailer.go index a3c3bea10..0bc7a06ff 100644 --- a/src/github.com/matrix-org/dendrite/mediaapi/thumbnailer/thumbnailer.go +++ b/src/github.com/matrix-org/dendrite/mediaapi/thumbnailer/thumbnailer.go @@ -310,8 +310,8 @@ func resize(dst types.Path, buffer []byte, w, h int, crop bool, logger *log.Entr func newThumbnailFitness() thumbnailFitness { return thumbnailFitness{ isSmaller: 1, - aspect: float64(16384 * 16384), - size: float64(16384 * 16384), + aspect: math.Inf(1), + size: math.Inf(1), methodMismatch: 0, fileSize: types.FileSizeBytes(math.MaxInt64), }