APNG support (26)

1 Name: Popcorn Mariachi : 2008-01-25 15:12 ID:Y4FPeaei [Del]

APNG is an extension to PNG that adds animation, both Opera and Firefox have beta versions supporting it.
Since it looks like APNG is unavoidable now, I've written a patch for wakaba that adds APNG support. (The problem is that APNGs get labeled as PNGs, thanks to mozilla being sneaky with the spec)

You can get it here:
http://foone.org/apng/wakautil-apng.patch

apply it with patch -p1 < wakautil-apng.patch

It'll name APNGs .apng instead of .png. You may need to do
AddType image/png .apng
to get them to not be marked as text/plain if you don't use mod-mime-magic. (Or whatever similar options exist for your webserver)

2 Name: Popcorn Mariachi : 2008-01-25 15:17 ID:Y4FPeaei [Del]

Forgot something:
This doesn't block them, BTW. You'll need to edit FORBIDDEN_EXTENSIONS in config.pl if you want to do that.
(4chan is blocking them now, bbwchan is just marking them)

3 Name: !WAHa.06x36 : 2008-01-25 15:53 ID:Heaven [Del]

Thanks!

Although is there really that much of a need to mark animated PNGs? GIF gets by fine without differentiating between animated and non-animated.

I guess I'll have to add support to Xee soon, too...

4 Name: Popcorn Mariachi : 2008-01-25 16:11 ID:Y4FPeaei [Del]

There is, and I'm currently writing up why.
It's mainly because they're so new nothing non-beta supports them, and with imageboards that can easily lead to users being able to sneakily post things that you can't see, because they're using Firefox 3.0 and you're using Safari or something.

The obvious abuse would be a two frame APNG, with acceptable content in frame 0 (the one non-APNG browsers show) and something nasty in 1, like child porn.

5 Name: Anonymous : 2008-01-25 17:50 ID:Heaven [Del]

So what's the difference between APNG and MNG?

6 Name: Popcorn Mariachi : 2008-01-25 18:13 ID:Y4FPeaei [Del]

Finished (or at least released) my mini-FAQ on the whole APNG issue:
http://foone.org/apng/

>>5
I added some info on the differences to my FAQ.

7 Name: !WAHa.06x36 : 2008-01-26 04:47 ID:Heaven [Del]

>>4

Fair enough.

8 Name: Anonymous : 2008-01-31 16:40 ID:7FGYRtLj [Del]

>>4
Wow, that's exactly what I thought when someone told me the Firefox 3 beta had APNG support ("Oh God, another way to post CP.") Not even a week ago or so, I was making a two frame APNG to post it on /a/ to check how many people had Firefox 3 (obviously harmless, it was something along the lines of that TTGL size chart/Yuyuko GIF), but I gave up when my image editor crashed on me.

I can't believe that, for once, 4chan admins preemptively solved a possible problem. Still a rather lame solution, I was looking forward to using APNGs with alpha transparency. Small clips from shows would also look a lot better without the 256 colors limitation.

9 Name: Anonymous : 2008-01-31 17:01 ID:Heaven [Del]

>>3

> I guess I'll have to add support to Xee soon, too...

That shouldn't be too hard, actually. Assuming Xee uses libpng, it should just be a matter of patching libpng with the patches Mozilla supplies:
http://littlesvr.ca/apng/

I'm torn when it comes to APNG. On one hand, APNG is a sneaky "à lá Microsoft" hack (1. Reject standard, 2. Create alternative, 3. Propose it to the standards body, 4. Get rejected, 5. Implement it anyway). I would have preferred if it had a different mime type and extension altogether. Who wants animated images to be displayed as static PNGs, anyway? If people started seeing broken images everywhere, it would just be a motivation for them to upgrade their browsers.

On the other hand, MNG is bloated, over-engineered and its only implementation, libmng, is rather crappy, when you compare it with the robustness of libpng. The fact that we're long overdue for something like APNG doesn't help, either.

10 Name: Anonymous : 2008-01-31 18:21 ID:Heaven [Del]

Hm.

> I would have preferred if it had a different mime type and extension altogether.

I think the solution to that is for anyone who maintains a web site to reject the ".png" extension for apng files and use ".apng" instead, like bbwchan is doing now, to make it clear that it is a different kind of animal.

> Who wants animated images to be displayed as static PNGs, anyway?

The very same behavior happens for GIF files in viewers that don't have animated GIF support -- the wide majority of general-purpose image viewers only show the first frame. And how old are animated GIFs now?

> If people started seeing broken images everywhere, it would just be a motivation for them to upgrade their browsers.

No, it'd be motivation for them to not care. That logic might make sense in theory but it doesn't work in practice. Look how badly transparent PNG files have been broken in IE for years, and yet people continue to use it because not doing anything is easier.

All considered, I think it's a good concept with a sloppy and poorly-thought-out implementation.

11 Name: Anonymous : 2008-01-31 18:48 ID:Heaven [Del]

> I think the solution to that is for anyone who maintains a web site to reject the ".png" extension for apng files and use ".apng" instead, like bbwchan is doing now, to make it clear that it is a different kind of animal.

It still uses the same mime type, though, which is annoying.

> The very same behavior happens for GIF files in viewers that don't have animated GIF support

Exactly. And it's a poor design, if you open a animated GIF with a viewer that doesn't support animation, you won't realize that it includes more than just one frame; you may even edit it without noticing and completely trash the animation after you save it.

IMO, this is just Mozilla repeating old mistakes all over again.

> No, it'd be motivation for them to not care.

Alright, I get the point. Thing is, the "graceful degradation" is pretty useless. No one uses a animated image file nowadays unless the animation IS important. Showing people the first frame of a animated image is just as bad as not showing them anything -- actually, it may be even worse; if the webmaster doesn't have a "THESE ARE ANIMATED PNG IMAGES" sign, people with browsers that don't support APNG may not even notice they're not seeing the full thing.

12 Name: Anonymous : 2008-02-01 01:35 ID:Heaven [Del]

> It still uses the same mime type, though, which is annoying.

Serve them as video/x-apng. Only FF3a supports it at the moment anyway, so this is a very good time to influence the implementation if you disagree with it. There's no standard document saying "APNG should be served with MIME type image/png" yet.

> No one uses a animated image file nowadays unless the animation IS important.

I disagree, but we probably have much different definitions of "important". I agree with your last point, though; if people don't see something that's obviously broken, how will they know it is? Heck, people still see horrendously broken transparent PNG files in IE, and most "casual users" usually don't even question the fact that a site looks like crap. I asked a friend of mine to test the layout of a page I did once in IE, and he said it looked fine... two days later I checked it myself and it was horribly broken, squashed together, and parts were overlapping or missing altogether. I had to point out what, to me, were really obvious differences before he even noticed that it wasn't rendering correctly.

13 Name: Popcorn Mariachi : 2008-02-02 23:46 ID:Y4FPeaei [Del]

>>8

>I can't believe that, for once, 4chan admins preemptively solved a possible problem.

That's cause I bugged them until they did something :)

14 Name: dmpk2k!hinhT6kz2E : 2008-02-10 14:30 ID:Heaven [Del]

Thanks for the heads up about this.

15 Name: aorf : 2008-10-30 00:31 ID:M6+jMvNn [Del]

>>13
You fucking idiot.
I hope you die in flames of hell.
Yeah, sure, someone might post CP, like he always does with gif, like he always does with transparent black/white pngs.
Is this a reason to ban all apngs? What kind of nazi are you?

Your php code is a joke. Slurp whole file, string search for IDAT, string search for acTL; wow. surely no one would think of inserting tEXt chunk with IDAT as data.

I wish I could kill you over internet.

16 Name: aorf : 2008-10-30 00:51 ID:M6+jMvNn [Del]

I'll be randomly posting jpegs catenated with rars containing child porn in /jp/ when I get home in sign of protest.

17 Name: Anonymous : 2008-10-30 13:48 ID:Heaven [Del]

>>15
This thread required a bump just so you can be a douchebag.

18 Name: Anonymous : 2010-02-12 05:39 ID:Z8Yy/BbW [Del]

>>12
But video/x-apng cause FF3 to download them, so I had to fudge it.

<FilesMatch "\.apng$">

    AddType video/x-apng .apng
BrowserMatch ^Mozilla/5\..*Firefox/3\. ACCEPT_APNG
BrowserMatch ^Opera/9.80.*Version/10\. ACCEPT_APNG
Header set Content-Type "image/png" env=ACCEPT_APNG

</FilesMatch>

19 Post deleted by moderator.

20 Post deleted by moderator.

21 Post deleted by user.

22 Post deleted by moderator.

23 Post deleted by moderator.

24 Name: Anonymous : 2013-12-06 02:13 ID:BOFrB1gR [Del]

Necropost just to say that killing internet innovation is a crime against humanity.

25 Name: !kCV4iED7yg : 2013-12-28 17:51 ID:u2dKGrsQ [Del]

wut is da different wit gif

26 Name: Anonymous : 2013-12-28 17:55 ID:u2dKGrsQ (Image: 350x279 png, 621 kb) [Del]

src/1388282140841.png: 350x279, 621 kb

APNG

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: