FIX: cropping GIF wasn't working

This commit is contained in:
Régis Hanol
2016-07-27 18:48:02 +02:00
parent 56d2626187
commit 11172b7c2d
2 changed files with 11 additions and 3 deletions

View File

@ -28,7 +28,8 @@ module ImageSizer
return [w.floor, h.floor] if w <= max_width && h <= max_height
ratio = max_width / w
[max_width.floor, [max_height, (h * ratio)].min.floor]
[[max_width, w].min.floor, [max_height, (h * ratio)].min.floor]
end
end