News for hackers. Stuff that matters.
Re:Chromium: Add support for Animated PNG by pornel on Tuesday March 14, 2017 @07:52PM (#13872653)
Hard to find any. It's a primitive format ignoring 20 years of video compression research. It tries to be replacement for GIF by repeating its mistakes: it has very basic inter-frame compression, lacks motion vectors, doesn't guarantee keyframes, RGB-only, and frame decoding isn't parallelizable.

In 8-bit mode it supports even fewer colors than GIF (GIF can combine frames to achieve thousands of colors), and in 24-bit mode it's larger than GIF.

For full-motion video it requires 10x-15x more data than VP9 to be decompressed by the CPU, and there's no hardware acceleration.

https://kornel.ski/efficient-gifs

There's false dichotomy between "animations" and "videos", mostly due to historical reasons and that older codecs (and AWebP) used 4:2:0 subsampling which made them blurry. VP9 supports alpha, 4:4:4 mode, and it's cheaper to decode (it's more complex, but using 10x less data offsets that), so it'd be best to forget that GIF and APNG ever existed.

Re:Chromium: Add support for Animated PNG by dasfasf on Tuesday March 14, 2017 @09:46PM (#13873155)
Which makes the timing all the more inscrutable. AV1 is supposed to have its bitstream finalized this month. Why now, when WebM is so widespread and there are new formats on the horizon, resurrect APNG after neglecting it at the only time it was relevant?
Re:Chromium: Add support for Animated PNG by robterrell on Wednesday March 15, 2017 @12:11AM (#13873752)
APNG is the format Apple is using for sticker packs in iMessage. I'm gonna go out on a limb and guess Google is ramping up to announce a sticker store for Allo... sticker pack devs could port them over without any effort.
Re:Chromium: Add support for Animated PNG by aorth on Wednesday March 15, 2017 @03:23AM (#13874397)
What is a sticker pack and why do you need to buy them?
Re:Chromium: Add support for Animated PNG by maxst on Wednesday March 15, 2017 @03:53AM (#13874508)
Re:Chromium: Add support for Animated PNG by japano1se on Wednesday March 15, 2017 @03:48AM (#13874481)
Small pictures to put in chat clients, rather like large emoji. It seems pointless, but I've had friends complain about going from clients that support stickers back to text chats like irc.
Re:Chromium: Add support for Animated PNG by skybrian on Tuesday March 14, 2017 @08:24PM (#13872839)
I wouldn't say it's a false dichotomy.

Technical limitations result in different cultural and artistic usages. Twitter's arbitrary 140 character limit resulted in a distinct culture. And it seems like not being allowed to embed images at all on Hacker News is part of this site's distinct culture.

And similarly with gifs. The question is whether you can move to a modern format (for better battery life) without also removing the limitations that resulted in a genre that's not just embedding an arbitrary video in a page.

Re:Chromium: Add support for Animated PNG by Grue3 on Wednesday March 15, 2017 @07:13AM (#13875272)
GIF and APNG are not video formats. They are lossless image formats that support sequential animation. They have never been intended to share video clips. You have a very narrow view of what can be done with GIF and APNG.
Re:Chromium: Add support for Animated PNG by Ajedi32 on Wednesday March 15, 2017 @10:37AM (#13876367)
> They are lossless image formats that support sequential animation

VP9 can also be lossless if desired, and what is a video if not "sequential animation"?

Re:Chromium: Add support for Animated PNG by Grue3 on Wednesday March 15, 2017 @11:41AM (#13876843)
That's like saying that audio is nothing but 0s and 1s. Video has analog origins, and digital video formats are heavily influenced by this. All the video compression techniques make little sense for animation, unless you like JPG artifacts and banding. There's no video format that supports transparency on most browsers. There's no video format that works with tiny dimensions (I tried to upload a 3x3 gif to Imgur and it failed because it couldn't convert it to "gifv"). Video formats have no concept of palette, frame delays and frame disposition. APNG with its partial transparency support offers so many possibilities in web design that it's really a shame Chrome didn't support it for so long.
Re:Chromium: Add support for Animated PNG by TwoBit on Wednesday March 15, 2017 @01:10AM (#13873962)
If video is so much better then why do we see it used so much less than it ought to be? Possibly partly because generating video is too difficult for many?
Re:Chromium: Add support for Animated PNG by vladdanilov on Wednesday March 15, 2017 @03:45AM (#13874469)
Agree that APNG is a poor replacement for GIF being mostly used to share video scenes, and VP9, having all those properties, is a perfect one.

The only problem is that VP9 is still lossy with RGB -> YUV -> DCT -> YUV -> RGB, similar to JPEG at quality 100. It kills it for universal use.

Moreover, it's a poor choice for vector animation and there's a high demand for it. But the same applies to APNG and GIF.

Re:Chromium: Add support for Animated PNG by Dylan16807 on Wednesday March 15, 2017 @06:30AM (#13875115)
> In 8-bit mode it supports even fewer colors than GIF (GIF can combine frames to achieve thousands of colors)

That's... technically possible but it gives you a ridiculous level of time-based artifacting when you need more than 256 colors to appear at the same time.

APNG beats animated GIF for most cases where animated GIF is useful. Just like PNG beats GIF for most cases where non-JPEG images are useful.

Re:Chromium: Add support for Animated PNG by versteegen on Wednesday March 15, 2017 @06:55PM (#13880678)
Time-based artifacting? I think you might not be aware that it's not necessary to have a time delay between frames (in fact, time delays and animations are actually a Netscape extension to the format!) In fact breaking a frame up into multiple pieces with different bounding boxes is a compression technique used to reduce the amount of zero bytes that need to be encoded/compressed. ImageMagick and gifsicle will do this.
Re:Chromium: Add support for Animated PNG by Dylan16807 on Thursday March 16, 2017 @02:51AM (#13883072)
If you set the delay between frames to 0 or 1 hundredths of a second, browsers will assume it's a mistake and bump it up, usually to 10. The fastest you can actually make the delay is 2/100 of a second. There's no way to have multiple frames show up simultaneously.
Re:Chromium: Add support for Animated PNG by andrewshadura on Thursday March 16, 2017 @07:52AM (#13884249)
There was a true-colour GIF using more than 256 colours using this technique.
Re:Chromium: Add support for Animated PNG by Dylan16807 on Thursday March 16, 2017 @05:20PM (#13889301)
Sure. It works eventually, but it causes distortion as the frames layer over each other with very visible delays.
Re:Chromium: Add support for Animated PNG by maxst on Wednesday March 15, 2017 @03:36AM (#13874441)
> so it'd be best to forget that GIF and APNG ever existed.

There are some good arguments in "Why not simply support WebM in <img>?": https://developers.google.com/speed/webp/faq#why_should_i_us...

Re:Chromium: Add support for Animated PNG by j3097736 on Tuesday March 14, 2017 @09:07PM (#13873036)
Animations can be easily edited with an image editor and most people probably don't want to spend time playing around with ffmpeg flags.
Re:Chromium: Add support for Animated PNG by minitech on Wednesday March 15, 2017 @05:34AM (#13874903)
Lossless video formats (lossless HEVC, lossless WebP) could also be edited with an image editor.
Re:Chromium: Add support for Animated PNG by epigramx on Wednesday March 15, 2017 @03:07AM (#13874344)
> It's a primitive format ignoring 20 years of video compression research.

It's why I find it hard to understand the excitement of many here about it.

This is very likely to take us backwards since most people don't get it.