don't click here

Alternative to animated GIFs

Discussion in 'Technical Discussion' started by Sik, Feb 11, 2012.

  1. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    OK, here's the issue: I want to make animations of some sprites I'm making. The most obvious way would be to use animated GIFs (the low color count doesn't matter since it's pixelart and it's always under 256 colors), but the problem is that frame durations are specified in 1/100ths of a second. When the animations are timed for 1/60ths of a second, you can see how this is an issue (especially for quick frames).

    APNG seems to be able to do frames with enough precision. However, I can't find a single suitable tool for making them, c'mon? Also I'm using Linux, so don't give me Windows programs =/ And no, I won't switch to Firefox just to use that APNG Editor add-on. Having to use a browser to edit an image is stupid.

    No idea how well does MNG do, but I know that browser support is almost non-existent, and that while GIMP can output those files, it can't read them (what?). Also Ubuntu's package repository doesn't seem to have anything to see MNG files either. Ugh.

    Any ideas?
     
  2. Flygon

    Flygon

    Member
    How about going to the closest number possible to 1/60th using 1/100th of a secoond figures? It'd be slightly off timing, but it'd be close enough.
     
  3. Lobotomy

    Lobotomy

    35% Cognac Banned
    4,394
    1
    0
    Traverse City
    Project: Matter/Energy
    Man, APNG is such a wasted potential. I wonder if Chrome supports APNG?
     
  4. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,845
    3
    18
    Glendale, AZ
    Living life.
    APNG? please go on I've never heard of such a format.
     
  5. Techokami

    Techokami

    For use only on NTSC Genesis systems Researcher
    1,373
    81
    28
    HoleNet!
    Sonic Worlds Next
    Animated PNG, it's still rather unsupported in image editors (you need this plugin to use the format in The GIMP) but somewhat supported in web browsers (p.much anything not IE)
     
  6. Violet CLM

    Violet CLM

    Member
    53
    15
    8
    Depending on what you want to do with them, you could put all the frames in a single image and set up some simple javascript to loop through them as a background-image property or in a <canvas> tag.
     
  7. Guess Who

    Guess Who

    It's a miracle! Oldbie
    4,296
    63
    28
    Oregon
    lol
    WebKit doesn't support it either, so Chrome, Safari, and practically all mobile browsers are disqualified. (Chrome does support it via an extension, however.)
     
  8. Dr. Mecha

    Dr. Mecha

    Member
    1,088
    3
    18
    Dallas, TX
    3d Models
    So far, only Opera support animated PNG.
     
  9. Chilly Willy

    Chilly Willy

    Tech Member
    751
    11
    18
    Doom 32X
    Try APNG Anime Maker:
    http://sites.google.com/site/cphktool/apng-anime-maker

    The download link is bad, but you can get it here:
    http://www.mediafire.com/?nj5mmgjzh31

    It runs under WINE in Ubuntu. It's really odd how support for APNG is rather lacking given it's a FAR better format than anigif. I blame Microsoft! :)

    EDIT: Okay, noticed you didn't want any Windows apps. Here's apngasm - the apng assembler: http://sourceforge.net/projects/apngasm/

    It's part of a group of related programs: http://gif2apng.sourceforge.net/

    If you look on the left down a ways, you find links to all the related apps.
     
  10. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    It isn't slitghtly off though, that's the issue, especially for frames that only show a bit. GIMP does rounding when saving GIFs, but the result is a disaster: 1/60 becomes 20ms, 2/60 becomes 30ms, 3/60 becomes 50ms, etc. And remember the errors accumulate over time. It isn't much of an issue when frames are longer (or they're multiples of 3/60), it becomes a serious issue otherwise.

    So, the suggestion is to take a HTML file and use javascript, along with separate PNG files (unless you want me to embed them with the data protocol, making things even more ugly), and then having to distribute all the files while ensuring their file hierarchy?

    I used to do that before for testing animations, but it's way too hackish and I'd rather have a proper animation file. Especially when I want to share the files.

    And Firefox, which is where the format originates... (but yeah, only Gecko and Presto browsers support it natively, though that's still a far better track record than MNG, which has almost no browser support, period XD)

    Ugh, if nothing else works I'll have to give this a try >_>

    Support for MNG is even worse. Basically people really aren't interested in jumping away from animated GIFs because it works.

    The usage of that thing is so convulted I'd rather avoid it x_x; (seriously, being forced to use specific filenames *and* having to provide metadata for in separate files for each frame? WTF?)
     
  11. Chilly Willy

    Chilly Willy

    Tech Member
    751
    11
    18
    Doom 32X
    Yeah, it really needs a front-end... something like that APNG Anime Maker. :v:

    Maybe a bash script would help with that... I might try to whip something up this week.
     
  12. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Even then it'd be a massive hack, since you'd need to copy the PNG files around (though on *nix you may get away with making links) and then making TXT files for each frame to specify their duration x_x
     
  13. Black Squirrel

    Black Squirrel

    no reverse gear Wiki Sysop
    8,531
    2,456
    93
    Northumberland, UK
    steamboat wiki
    When I came back to Sonic Retro a couple of years ago I was using this as an avatar
    [​IMG]
    that's an APNG. Firefox/Opera users could watch it CHANGE.

    I used an extension within Paint.NET to build it, though obviously that doesn't play well with the "not Windows" bit. That being said, Paint.NET is wonderful.

    But I should probably point out that as a general rule, image editing isn't really Linux's strong point. There's the GIMP for rasters, and Inkscape for vectors, both of which have horrible user interfaces (but there's no decent alternative to the latter). It's an OS that attracts programmers, not artists. You're even less likely to find something that supports APNG because it's still seldom used