Page 1 of 1

I realised I can make animated gifs

Posted: Fri Apr 10, 2015 12:10 am
by Loons
Image

Posted: Fri Apr 10, 2015 1:37 am
by EdLee
Hi Loons, you're so hi-tech. How did you make that toy ? :tmbup:

Re: I realised I can make animated gifs

Posted: Fri Apr 10, 2015 2:07 am
by Loons
With the ugliest Matlab code ever written ;p. Actually, MATLAB's animated GIF functionality is the ugly aspect.

Re: I realised I can make animated gifs

Posted: Fri Apr 10, 2015 7:37 am
by RBerenguel
Loons wrote:With the ugliest Matlab code ever written ;p. Actually, MATLAB's animated GIF functionality is the ugly aspect.
I have created animated gifs of SGF files (for problem solutions and also for games) using sgftools (and my hack to make it look nicer) and gifsicle.

Re: I realised I can make animated gifs

Posted: Fri Apr 10, 2015 9:52 am
by RBerenguel
RBerenguel wrote:
Loons wrote:With the ugliest Matlab code ever written ;p. Actually, MATLAB's animated GIF functionality is the ugly aspect.
I have created animated gifs of SGF files (for problem solutions and also for games) using sgftools (and my hack to make it look nicer) and gifsicle.
I was on iPad so I didn't have any of the files. Here's a Go Seigen game, using just normal sgftopng. If I was to create it now I'd use the hacks I added to it so the board and stones look nicer (at the expense of a heavier GIF)

Posted: Fri Apr 10, 2015 2:10 pm
by EdLee
RBerenguel wrote:If I was to create it now I'd use the hacks I added to it so the board and stones look nicer (at the expense of a heavier GIF)
Hi RBerenguel, could you do it and show us the nicer result ? :)

Re: I realised I can make animated gifs

Posted: Sat Apr 11, 2015 3:01 am
by RBerenguel
Well, yes, but no... The animated gif result is 136 mb :D Gif is very, very inefficient for compressing. I'm now running gifscile with O3 to see if it gets smaller. Will report back after groceries ;)

Re: I realised I can make animated gifs

Posted: Sat Apr 11, 2015 3:25 am
by RBerenguel
RBerenguel wrote:Well, yes, but no... The animated gif result is 136 mb :D Gif is very, very inefficient for compressing. I'm now running gifscile with O3 to see if it gets smaller. Will report back after groceries ;)
You can download the optimised 98MB file (yikes) from here. (it is from my Public Dropbox folder, so it may go eventually, as of now it is still uploading so wait 30 minutes or so, I have shitty upload speed.)

I just downloaded and APNG encoder, maybe animated pngs are better optimised (or Webp, I'll try that instead later, maybe.) A good delta-frame-compressor should get the file pretty small, since stones and non-stoned areas are always the same, so the deltas are pretty straightforward

Re: I realised I can make animated gifs

Posted: Sat Apr 11, 2015 4:34 am
by RBerenguel
Holy sh*t. Converted to apng (well, recreated as apng.) Apng is a well, not-very-implemented standard, with animated pngs with alpha channels. You can have it in Chrome with a plugin/development version, in Safari v>8 and any Firefox. The file is a whooping 2.3 MB. For comparison, the image with an empty board or a few stones is ~1MB.

Behind hide tags, as I said it will only animate on Firefox straight out of the box.
--.png
--.png (2.22 MiB) Viewed 7666 times

Re: I realised I can make animated gifs

Posted: Sat Apr 11, 2015 4:47 am
by Bonobo

Re: I realised I can make animated gifs

Posted: Sat Apr 11, 2015 4:56 am
by RBerenguel
Bonobo wrote:Awesome!

Here’s the Chrome plugin: APNG for Chrome, “Animated PNG support for WebKit/Blink browsers”
Thanks!

Posted: Sat Apr 11, 2015 5:49 am
by EdLee
RBerenguel wrote:it will only animate on Firefox
Thanks. On Safari on an ancient iPhone 4S, I can see only the first :b1: at star point,
but it looks nice. Will try Firefox after sleep. :)

Re:

Posted: Sat Apr 11, 2015 6:47 am
by RBerenguel
EdLee wrote:
RBerenguel wrote:it will only animate on Firefox
Thanks. On Safari on an ancient iPhone 4S, I can see only the first :b1: at star point,
but it looks nice. Will try Firefox after sleep. :)
For mobile safari, you seem to need iOS 8.3 Better than nothing ;-)

Re: I realised I can make animated gifs

Posted: Sun Apr 12, 2015 2:53 am
by SpongeBob
Chrome on iOS 8.2 works, too.

Re: I realised I can make animated gifs

Posted: Sun Apr 12, 2015 4:43 am
by RBerenguel
I guess then Safari on iOS 8.2 also works (unless Apple has changed how it makes 2-nd party browsers work, Chrome uses the same renderer and JS engine as Safari)