Skip to content

Commit

Permalink
Images with the exact same aspect ratio as the album size were gettin…
Browse files Browse the repository at this point in the history
…g wrong dimensions
  • Loading branch information
thiagoarrais committed Apr 28, 2011
1 parent 5d02903 commit c64254d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imagenie.coffee
Expand Up @@ -20,7 +20,7 @@ resize = (imgSource, width, height, callback) ->
stream.on 'end', (err, stderr) -> callback(imgResized.content())

calculateTargetSize = (orig, max) ->
if orig.width / orig.height * max.max_height > max.max_width
if orig.width / orig.height * max.max_height >= max.max_width
width : max.max_width
height : 0
else
Expand Down

0 comments on commit c64254d

Please sign in to comment.