buzzfeed/libgif-js — pull request #5 by noslouch (2014-06-26 18:53:03+00:00)
Title: Fixes max_width parameter

The `max_width` parameter was acting as a "set to width" parameter, meaning the canvas was being scaled to the given dimension even if the the image was smaller than `max_width`. `max_width` should only affect gifs that are larger than the given `max_width` value.

This adds an additional test to the `get_canvas_scale` method, checking if `hdr.width` is greater than the given `max_width` option before setting `scale` to something other than 1.