News for hackers. Stuff that matters.
Re:Evolution of <img>: Gif without the GIF by hbbio on Monday December 04, 2017 @12:06PM (#15845396)
APNG is also a very good way to achieve that! No limits in the number of colors, better compression. No patents?

All major browsers now support APNG, Chrome being the last in the bunch :) For example, we use it in our README screencast for https://github.com/wallix/awless

Re:Evolution of <img>: Gif without the GIF by mmastrac on Monday December 04, 2017 @12:10PM (#15845440)
I didn't realize support for this had improved, but it's still missing Edge: https://caniuse.com/#feat=apng

You could probably polyfill something in WebAssembly for it, however!

Re:Evolution of <img>: Gif without the GIF by cflat on Monday December 04, 2017 @12:12PM (#15845454)
still ridiculously large file compared to webm/mp4. The alpha support is cool though.
Re:Evolution of <img>: Gif without the GIF by no_wizard on Monday December 04, 2017 @01:12PM (#15846047)
Here is an existing poly fill (I have not reviewed or tested this. I got it from the caniuse site)

https://github.com/davidmz/apng-canvas

Re:Evolution of <img>: Gif without the GIF by chrisseaton on Monday December 04, 2017 @12:24PM (#15845554)
> better compression

Better compression than MP4?

Re:Evolution of <img>: Gif without the GIF by Houshalter on Tuesday December 05, 2017 @01:14AM (#15850114)
For certain kinds of content, possibly.
Re:Evolution of <img>: Gif without the GIF by conradfr on Monday December 04, 2017 @12:44PM (#15845768)
For some reason your Github page makes my FF 57 (Win7) process' memory jump from 114Mo to 4.5Go.
Re:Evolution of <img>: Gif without the GIF by aw3c2 on Monday December 04, 2017 @01:31PM (#15846231)
Opening the apng directly in a Firefox tab froze my whole linux system completely.
Re:Evolution of <img>: Gif without the GIF by phit_ on Tuesday December 05, 2017 @12:30AM (#15849947)
FF59 Win10 went from 1.7gb to 6.2gb
Re:Evolution of <img>: Gif without the GIF by Houshalter on Tuesday December 05, 2017 @01:18AM (#15850138)
A weird thing about apng is it doesn't do any interframe compression. Even GIF has that. It's just a series of png images crammed into a single file.
Re:Evolution of <img>: Gif without the GIF by Dylan16807 on Tuesday December 05, 2017 @02:43AM (#15850429)
That's not true. It has basic controls to use/clear/revert the last frame and whether the new frame draws on top or replaces part of it.

It's still useless when things are moving, but it's no worse than gif.

Re:Evolution of <img>: Gif without the GIF by Houshalter on Tuesday December 05, 2017 @05:24AM (#15850942)
Oh, huh my mistake. I was thinking about how PNG compression is entirely based around using the previous pixels to predict the next one. But as far as I know, apng doesn't update the filters to use information from the previous frame. I guess you can use transparent pixels to compress pixels that don't change though.
Re:Evolution of <img>: Gif without the GIF by Dylan16807 on Tuesday December 05, 2017 @03:13PM (#15855342)
Oh, yeah, it definitely resets the compression context between frames. But so does a video format.

No format that I'm aware of supports lossless compression that spans frames. Which leads to a funny situation where some images compress best by custom outputting a .gif or .png with no compression, and then zipping it.

Re:Evolution of <img>: Gif without the GIF by Houshalter on Tuesday December 05, 2017 @04:51PM (#15856363)
As I understand it all video compression uses delta compression between frames. And you mention another issue I forgot, that it can't reuse Huffman codes or any common segments between frames. Since they are independently compressed.
Re:Evolution of <img>: Gif without the GIF by Dylan16807 on Tuesday December 05, 2017 @06:01PM (#15856930)
> As I understand it all video compression uses delta compression between frames.

And so does apng, more or less, via alpha. But that's less important than motion interpolation, which it utterly lacks.

Re:Evolution of <img>: Gif without the GIF by chronial on Monday December 04, 2017 @06:44PM (#15848608)
That github page and the apng made my firefox eat multiple gigabytes of ram and almost killed my system.
Re:Evolution of <img>: Gif without the GIF by satysin on Monday December 04, 2017 @07:35PM (#15848851)
Holy crap you weren't kidding!

Fresh start of latest release version of Firefox and it shoots up to 4GB memory the moment I open just that page!

https://i.imgur.com/KJaWy2G.png

Note that Chrome also has the same page open (as well as several others) and is using less than 800MB memory.

Re:Evolution of <img>: Gif without the GIF by NelsonMinar on Monday December 04, 2017 @01:30PM (#15846225)
Is there data on GIF vs APNG vs video compression?
Re:Evolution of <img>: Gif without the GIF by donatj on Monday December 04, 2017 @12:43PM (#15845754)
Is the compression actually better? I just tried re-encoding some of my larger gif files with it and they all came out 2x the size.
Re:Evolution of <img>: Gif without the GIF by cflat on Monday December 04, 2017 @01:40PM (#15846299)
This usually happens when you have colour pallet increases. If you had a simple animated Gif with only 256 colours and convert it to any video you instantly have more data to compress. The better use case is where you start with video and convert down to gif (like when you use gif.ski)