Re:Show HN: Gif2sprite – Convert animated GIFs to image spri...
by Vheissu on Thursday October 31, 2013 @12:08AM
(#6645173)
This is really cool shame about the lack of style though, but it seems to work really well. I could see use in this for being able to pause, play and rewind animated gifs. Seems you also reduce the size of the original gif converting it which could offer some benefits, I uploaded a 1.5mb gif and it reduced it to a 700kb sprite. If you supplied a Javascript plugin to be able to use the sprites as gifs in the zip download, it would make this so much better. Good job, nice and original idea.
[ Parent
| on HN ]
Re:Show HN: Gif2sprite – Convert animated GIFs to image spri...
by DigitalSea on Thursday October 31, 2013 @12:28AM
(#6645225)
The lack of style was intentional, it took me less than the better part of an hour to build this. I built it because I needed to convert a GIF to a sprite and didn't want to have to use Photoshop. I am planning on a bundled JavaScript library with weekend actually so you'll be able to pause, play and rewind the sprites as if they were videos. I have some code for another project that does this, but it's not in a form of easy to use drop in code. And the reduced file size is because I am compressing the JPG images when the GIF is split, then once the frames are combined, I am compressing further. At first I thought this would result in poor quality sprites and not make a difference, but it seems the double compression works really well.
Thanks for the nice words, I hope someone finds it useful. If people find it of use, I might devote more time to making it a little nicer and more feature-packed besides the JavaScript library I'll be making for it this weekend.
Re:Show HN: Gif2sprite – Convert animated GIFs to image spri...
by super-serial on Thursday October 31, 2013 @12:35PM
(#6647799)
A javascript library would be extremely useful.
I was thinking of extracting the gif parsing code from this project: https://github.com/shachaf/jsgif
Then I looked at the code. I've never seen such callback hell in js without there being a server... so I abandoned that idea and was eventually planning on writing my own.
Re:Show HN: Gif2sprite – Convert animated GIFs to image spri...
by DigitalSea on Thursday October 31, 2013 @07:04PM
(#6650685)
It's funny you say that, I've been looking at this: https://github.com/buzzfeed/libgif-js — it's a fork of jsgif, but doesn't require a server though. You call the library on the GIF and it handles the rest.