mediaapi/thumbnailer: Use math.Inf() for max aspect and size

This commit is contained in:
Robert Swain 2017-06-05 17:08:16 +02:00
parent 2cd886656f
commit 9a67ea746d

View file

@ -310,8 +310,8 @@ func resize(dst types.Path, buffer []byte, w, h int, crop bool, logger *log.Entr
func newThumbnailFitness() thumbnailFitness { func newThumbnailFitness() thumbnailFitness {
return thumbnailFitness{ return thumbnailFitness{
isSmaller: 1, isSmaller: 1,
aspect: float64(16384 * 16384), aspect: math.Inf(1),
size: float64(16384 * 16384), size: math.Inf(1),
methodMismatch: 0, methodMismatch: 0,
fileSize: types.FileSizeBytes(math.MaxInt64), fileSize: types.FileSizeBytes(math.MaxInt64),
} }