I realised I can make animated gifs

General conversations about Go belong here.
Post Reply
User avatar
Loons
Gosei
Posts: 1378
Joined: Tue Apr 20, 2010 4:17 am
GD Posts: 0
Location: wHam!lton, Aotearoa
Has thanked: 253 times
Been thanked: 105 times

I realised I can make animated gifs

Post by Loons »

Image
Revisiting Go - Study Journal
My Programming Blog - About the evolution of my go bot.
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post by EdLee »

Hi Loons, you're so hi-tech. How did you make that toy ? :tmbup:
User avatar
Loons
Gosei
Posts: 1378
Joined: Tue Apr 20, 2010 4:17 am
GD Posts: 0
Location: wHam!lton, Aotearoa
Has thanked: 253 times
Been thanked: 105 times

Re: I realised I can make animated gifs

Post by Loons »

With the ugliest Matlab code ever written ;p. Actually, MATLAB's animated GIF functionality is the ugly aspect.
Revisiting Go - Study Journal
My Programming Blog - About the evolution of my go bot.
User avatar
RBerenguel
Gosei
Posts: 1585
Joined: Fri Nov 18, 2011 11:44 am
Rank: KGS 5k
GD Posts: 0
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Location: Barcelona, Spain (GMT+1)
Has thanked: 576 times
Been thanked: 298 times
Contact:

Re: I realised I can make animated gifs

Post 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.
Geek of all trades, master of none: the motto for my blog mostlymaths.net
User avatar
RBerenguel
Gosei
Posts: 1585
Joined: Fri Nov 18, 2011 11:44 am
Rank: KGS 5k
GD Posts: 0
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Location: Barcelona, Spain (GMT+1)
Has thanked: 576 times
Been thanked: 298 times
Contact:

Re: I realised I can make animated gifs

Post 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)
Attachments
GoSeigen-progame_41658-.gif
GoSeigen-progame_41658-.gif (2.24 MiB) Viewed 7810 times
Geek of all trades, master of none: the motto for my blog mostlymaths.net
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post 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 ? :)
User avatar
RBerenguel
Gosei
Posts: 1585
Joined: Fri Nov 18, 2011 11:44 am
Rank: KGS 5k
GD Posts: 0
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Location: Barcelona, Spain (GMT+1)
Has thanked: 576 times
Been thanked: 298 times
Contact:

Re: I realised I can make animated gifs

Post 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 ;)
Geek of all trades, master of none: the motto for my blog mostlymaths.net
User avatar
RBerenguel
Gosei
Posts: 1585
Joined: Fri Nov 18, 2011 11:44 am
Rank: KGS 5k
GD Posts: 0
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Location: Barcelona, Spain (GMT+1)
Has thanked: 576 times
Been thanked: 298 times
Contact:

Re: I realised I can make animated gifs

Post 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
Geek of all trades, master of none: the motto for my blog mostlymaths.net
User avatar
RBerenguel
Gosei
Posts: 1585
Joined: Fri Nov 18, 2011 11:44 am
Rank: KGS 5k
GD Posts: 0
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Location: Barcelona, Spain (GMT+1)
Has thanked: 576 times
Been thanked: 298 times
Contact:

Re: I realised I can make animated gifs

Post 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 7667 times
Geek of all trades, master of none: the motto for my blog mostlymaths.net
User avatar
Bonobo
Oza
Posts: 2227
Joined: Fri Dec 23, 2011 6:39 pm
Rank: OGS 13k
GD Posts: 0
OGS: trohde
Universal go server handle: trohde
Location: Lüneburg Heath, North Germany
Has thanked: 8263 times
Been thanked: 925 times
Contact:

Re: I realised I can make animated gifs

Post by Bonobo »

“The only difference between me and a madman is that I’m not mad.” — Salvador Dali
User avatar
RBerenguel
Gosei
Posts: 1585
Joined: Fri Nov 18, 2011 11:44 am
Rank: KGS 5k
GD Posts: 0
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Location: Barcelona, Spain (GMT+1)
Has thanked: 576 times
Been thanked: 298 times
Contact:

Re: I realised I can make animated gifs

Post by RBerenguel »

Bonobo wrote:Awesome!

Here’s the Chrome plugin: APNG for Chrome, “Animated PNG support for WebKit/Blink browsers”
Thanks!
Geek of all trades, master of none: the motto for my blog mostlymaths.net
User avatar
EdLee
Honinbo
Posts: 8859
Joined: Sat Apr 24, 2010 6:49 pm
GD Posts: 312
Location: Santa Barbara, CA
Has thanked: 349 times
Been thanked: 2070 times

Post 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. :)
User avatar
RBerenguel
Gosei
Posts: 1585
Joined: Fri Nov 18, 2011 11:44 am
Rank: KGS 5k
GD Posts: 0
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Location: Barcelona, Spain (GMT+1)
Has thanked: 576 times
Been thanked: 298 times
Contact:

Re:

Post 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 ;-)
Geek of all trades, master of none: the motto for my blog mostlymaths.net
User avatar
SpongeBob
Lives in gote
Posts: 499
Joined: Sat Apr 24, 2010 3:18 pm
Rank: Fox 3D
GD Posts: 325
Location: Germany
Has thanked: 213 times
Been thanked: 96 times

Re: I realised I can make animated gifs

Post by SpongeBob »

Chrome on iOS 8.2 works, too.
Stay out of my territory! (W. White, aka Heisenberg)
User avatar
RBerenguel
Gosei
Posts: 1585
Joined: Fri Nov 18, 2011 11:44 am
Rank: KGS 5k
GD Posts: 0
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Location: Barcelona, Spain (GMT+1)
Has thanked: 576 times
Been thanked: 298 times
Contact:

Re: I realised I can make animated gifs

Post 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)
Geek of all trades, master of none: the motto for my blog mostlymaths.net
Post Reply