Notes

Reversomatic will create a temporary folder, inside the specified temp directory, for every call to processGif() with a valid input GIF. This folder is used to store the temporary frames (in .png format) of the input GIF during the reversal process. The folder will be cleaned up before control is passed to the callback provided to processGif(), whether the reversal was successful or otherwise.

Every call to processGif() runs asynchronously, and neither performs disk space checks nor keeps a 'thread pool' or similar mechanism. The responsibility falls to the user to ensure that usage is kept to within available system resources.

processGif() Options

averageFrameDelay: boolean

Reversomatic will average the delay of each of the input GIF's frames to determine the output GIF's frame delay rate if averageFrameDelay is true. averageFrameDelay takes precedence over all other delay settings if enabled.

forcedFrameDelay: number

Reversomatic will floor the value provided in forcedFrameDelay and use it as the constant frame delay in the output GIF.

If neither of the above options are set, Reversomatic will use the input GIF's first frame delay to determine the output GIF's constant frame delay.

Known Bugs & Limitations

Certain GIFs do not report the correct duration and/or frame delay, and so may not display correctly, or may falsely trigger your duration limit

Does not support GIFs with a variable frame delay. Either the first frame's delay is used as the delay for the entire GIF, or the delays of all frames are averaged.

Contributors

Please make every effort to adhere to the established code style.

Global prerequesites (TypeScript, uglify, and npm-watch) can be installed by running:

npm run preinstall_global_deps

A file watcher can be started, after installing the prerequesites, by running:

npm run watch

Which will build .ts files in the src folder and put them in reversomatic.js in the lib folder.

Changelog

1.0.9 - January 1, 2018

Made all main processes in processGif() async

Cleaned up code

README updates

1.0.8 & 1.0.8b/c - December 31, 2017

processGif() now returns correct output GIF duration

(b) Values provided in the forcedFrameDelay option are now converted to floored integers before processing begins

README updates

1.0.7 & 1.0.7b/c/d - December 31, 2017

Added additional option, forcedFrameDelay, to processGif() options

(c) Removed unnecessary dependencies

(d) Remembered to actually build ;)

README updates

1.0.6 & 1.0.6b - December 30, 2017

Made unlimited input file size the default so as not to cause any surprises