MNG revisited

(I’m back, and I’ve reopened comments. Discuss away.)

Mike Connor has taken me to task about perceived inaccuracies in my MNG post.

He misrepresents my first point, which was dealing with perceived bloat in the spec and features, not the implementation. I believe my point still stands – I’ve heard people argue that the SVG spec is terribly overdone, but that’s not being used as an argument against implementing it.

The basis of my post, including all the figures except one, was information from a libpng hacker, who stated that there were no outstanding issues with replacing libpng with libmng and still getting the necessary PNG performance. So I stand by my 48k figure, and my assertion that there are no issues with replacing libpng with libmng.

He also says:

Its also a little shocking that Gerv missed the point of apng, which is to provide a format that can be animated, but still degrades gracefully on other browsers.

I was originally told that the point of apng was to allow Mozilla chrome to move away from animated GIFs. If it’s now a new image format for the web, that’s a rather different question, and perhaps not something we should be designing on the back of an envelope in ten minutes.

I had a better discussion with Brendan via email and IRC, but I don’t currently have his permission to post it.

In any event, it seems that the APNG folks and the PNG folks are chatting away fairly happily. If something like APNG becomes a revision of the PNG spec, I quite agree that it would be the best result all round. In that case, I’d like to agree with calls to revert to the 0.2 spec behaviour of putting the additional image data after the IEND chunk rather than nesting chunks, if that becomes technically and politically possible. As Adam Costello says, it’s less in line with the wording of the current spec, but more in line with its spirit.

Also, it seems to make sense to me for the default image (the first in the stream) to be the last in the animation. This is more likely IMO to produce a better degredation in the common case. Would it be too complicated for an APNG-aware decoder to “put the first image to the back”? Could one do it simply by shuffling the objects representing the chunks in memory?

15 thoughts on “MNG revisited

  1. A problem with some of your suggestions is that they won’t degrade nicely in IE (at least the last image of the animation bit). I liked the idea of being able to include animations on the web that people using other browsers can get some information from. MNG is such a big spec (with no relevant small-profile instead it has lots of small profiles none of which match animated gif) that as far as I know other modern browsers (Safari et al) aren’t planning to implement it. It seems strange you hold SVG up as an example when its support across the web is still pretty non-existant. I hope Mozilla and other browsers do manage to find a way to include it but with it breaking parts of CSS the road ahead is not going to be completely smooth. And if we can get a working, small MNG decoder in Mozilla as well that would be great for more complex animations or when your target audience will have Mozilla available!

  2. Excuse my last comment, I completely mis-understood what you meant about the last frame/first frame thing. Don’t mind me…

  3. > As Adam Costello says, it’s less in line with the wording of the current spec, but more in line with its spirit.

    Actually, I said much the same originally when we changed our APNG proposal from 0.2 to 0.3 — changing from using data-after-IEND to using data within chunks in the stream, after much persuasive arguments that it was the right way to go. I’m not sure why this issue is being revisited, but there it is.

  4. > SVG spec is terribly overdone, but that’s not
    > being used as an argument against implementing it.

    It’s not? We’re implementing SVG 1.1, which is not too terribly overdone. SVG 1.2 _is_, and that’s why there are no plans to implement it at this point (and some people arguing that implementing it, ever, would be a mistake).

  5. Think before you write!

    The folks who write Mozilla and Firefox have long been debating whether to support MNG animations on webpages (they would be the only browser to do so as far as I know). They’ve come up with a new simpler format called APNG that’s being discussed as …

  6. Please note that the default image is the first in the “physical” stream, but it can be in any position in the “logical” animation (as viewed on the screen).

  7. Hmm… apparently my previous comment was true only up to version 0.3 of the APNG spec. In version 0.4 the default image can be either the first of the animation or can be entirely skipped from the animation. Sorry for the confusion.

  8. > Vlad – I didn’t mean to imply that you were against that idea. I just wanted to add my support :-)

    Actually, I am (now) against the idea.. :) Lots of good reasons why it shouldn’t be done that way, the main one being that applications that use PNGs within some other container format (even a simple stream) will break if they expect that a PNG stream ends at IEND, and then find extra foo after it.

  9. Why is everyone trying to help Internet Explorer? You’re trying to make it degrade gracefully for Internet Explorer? It doesn’t even support normal PNG’s in their entirety. It shouldn’t be up to the image format to support unsupportive browsers, it should be up to the individual using the images.

    Mozilla Firefox is my default browser, and yet Internet Explorer still dictates what I see on the web.

  10. I think hemebond is on to something — why the effort to keep non-compliant, non-free, known-buggy software working? If people who look at switching browsers purely based on feature sets (as opposed to software freedom or even price of software) weigh the situation and discover that “everything works” in Microsoft Internet Explorer, won’t they continue using MSIE?

  11. J.B. –

    I think the point is to create sometihng that will get adopted by the general web community, and in turn, application developers. Yes, mozilla/firefox is more advanced, more compliant, and all-around a more pleasant browsing experience, but the reality of the situation is that a ton of people use IE. Less people, mind you, due to the recent security issues, but a _huge_ chunk, nonetheless. If it doesn’t work in a browser the majority of people use, the common user will not demand a browser that _can_ handle it – they will just ignore the format altogether. People tend not to do more work than they are required to, and if adoption is important, graceful degradation across non-compliant browsers is also important.

  12. “I think hemebond is on to something — why the effort to keep non-compliant, non-free, known-buggy software working?”

    Honestly, WTF? 90% (at least!) of the world on the world wide web uses IE. If you don’t have graceful degredation on world’s most popular browser, that means at least 90% of web developers won’t use the spec. Therefore, the spec is useless and everyone loses. Duh, think before you post.

  13. IMO, the best Mozilla/Firefox features (from a layout point of view) for making people switch are those which work in IE, but are measurably and noticeably better in Firefox.

  14. Most users inside my comeunity switched to mozilla/firefox cause.

    I’ve told them,
    – that it is more secure (known at the moment)
    – it may be faster and easier for them
    – the scrolling to last text JS only works with mozilla/firefox ( *hehe* )

    So people will also switch, if IE don’t do something like other browsers.