Skip to content

Releases: xparq/AnimGif

API sweetening, example PHP, small fixes

23 May 23:41
Compare
Choose a tag to compare
  • Added API method save($filename).
  • Added image dir source to create().
  • create() now returns $this for method chaining.
  • Fixed errors in reset(). (Wow, even there?!...)
  • Added a slideshow example script (index.php) for convenience.

Better delay times & error handling

17 May 17:05
Compare
Choose a tag to compare
  • Delay values can be selectively omitted (the previous one will by used by default).
  • Changed default delay time to 100ms.
  • Fixed delay time units (from ms to 0.01s).
  • API change: $->gifBinary() -> $->gif().
  • Almost real error handling for image loading...
  • Various other code improvements (errors, control flow, cleanup etc.)
  • Some cleanup & refresing of the docs. (incl. comments)

Stylistic refreshments, small fixes & improvements everywhere

24 Apr 23:16
Compare
Choose a tag to compare

TODO:

  • Default anim delay doesn't seem to be 40 ms, at all. :-o

DONE:

  • Fix ERR01 "Source is not a GIF image.": there's a .png in the examples!
    -> And it does support non-GIF files actually.
    Moved the error check to resource inputs only, and changed it to
    "Resource is not a GIF image.".
  • create() should iterate $frames with foreach() not for assuming direct
    indexes from 0 to < count.
    (The array keys can be anything, and should not affect the results.)
  • Removed unused $mode from reporting ERR02.
  • $duration now has a meaningful default in create().
  • $frames was incorrectly made an optional arg. of create().
  • Support custom even timing without an array.
  • Separate ERR00 from $durations not being an array.
  • Fix leftover $GIF_tim in create().
  • Renamed method getGif() to get().
  • Renamed class to AnimGif (from GifCreator).
  • Made $this->version a define (VERSION).
  • Made $this->errors really static (self::$errors).
  • Moved encodeAsciiToChar() out from the class to the namespace root as a general utility fn.
  • Moved getGif to the "public" section (and removed the Getter/Setter section).
  • Moved reset() closer up to the ctor.
  • Changed comments here & there.
  • Whitespaces: fixed some tab/space mismatch etc.
  • Changed {$i} indexes to [$i] in gifBlockCompare(), just for fun. ;-p