You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed wgif on ubuntu today and the gifs it made had the frames in essentially random order. I tracked the problem down to this line—according to this, .glob isn't guaranteed to return its results in any particular order. If I put a little puts frames_dir.inspect in the make_gif method, I get output like this:
(When I run this on OSX, I get the same frames back—but sorted lexicographically.)
I think the fix is pretty easy—just put a .sort on the end of this line. (I made this change in my local copy and it works fine—sorry for no pull request, I don't actually know how to write ruby and I'm not quite sure how I'd write unit/regression tests for this.)
The text was updated successfully, but these errors were encountered:
Oh my glob, sorry this easy fix was open for so long! Notifications for this project keep getting lost and I just noticed your issue tonight. 😒
You're totally right: Dir#glob sorts alphabetically on OS X, but not on Linux/Windows. I added your fix and pushed up version 0.5.3 to Rubygems. Looks good on my Ubuntu VM, but I'll wait until you confirm to close the issue.
I installed wgif on ubuntu today and the gifs it made had the frames in essentially random order. I tracked the problem down to this line—according to this,
.glob
isn't guaranteed to return its results in any particular order. If I put a littleputs frames_dir.inspect
in themake_gif
method, I get output like this:(When I run this on OSX, I get the same frames back—but sorted lexicographically.)
I think the fix is pretty easy—just put a
.sort
on the end of this line. (I made this change in my local copy and it works fine—sorry for no pull request, I don't actually know how to write ruby and I'm not quite sure how I'd write unit/regression tests for this.)The text was updated successfully, but these errors were encountered: