scaleup flag

This commit is contained in:
Rune Madsen 2015-08-12 14:39:38 -04:00
parent f6e6a2cc86
commit 4e60c683b0
7 changed files with 57 additions and 15 deletions

View file

@ -102,11 +102,13 @@ func transformImage(m image.Image, opt Options) image.Image {
}
// never resize larger than the original image
if w > imgW {
w = imgW
}
if h > imgH {
h = imgH
if !opt.ScaleUp {
if w > imgW {
w = imgW
}
if h > imgH {
h = imgH
}
}
// resize