.gif viewer in Python built on top of pyglet (openGL), using the native pyglet implementation of .gif loading into Animation and Sprite.
- Python 2.7
- pyglet
- fullscreen: zoetro.py can display the .gif in its original size, adapted to the maximum size of the display, with a transparent background around the .gif animation. In fullscreen, zoetro.py will catch the whole screen and display a black background around the .gif animation.
- scaled: while in fullscreen, zoetro.py will leave the .gif in its original size (minus the display size adaptation). If scaled, in fullscreen, zoetro.py will scale the .gif animation to one of the max dimension of the display maximum size.
- loop: zoetro.py loads a .gif in an animation, display it, then switch to the next one. If in loop mode, zoetro.py will reload the same .gif after the first display. Two sub-modes are available: infinite-loop (where the same .gif loops until the user manually switch to the next or previous .gif) and k-loop mode (loop only k-times before switching to the next .gif).
- list the .gif animations from a folder using the ".gif" extension and/or the GIF8 magic number
- randomize and un-randomize the .gif animations list order while keeping the current .gif as a pointer in the list
- configurable default display time for 1-frame .gif
- display size adaptation while rendering the .gif animation
- switching mode does not break the display, nor reset the .gif animation, nor reset the loop count
- stackable mode (fullscreen-infinitely-looped-scaled-animation !)
- keyboard controls
- ESC: close the window and quit the pyglet application
- ENTER: fullscreen mode on/off
- LSHIFT: scaled mode on/off
- L: loop mode on/off
- R: randomize the .gif animation list order
- T: reset the .gif animation list to the loading order
- RIGHT: display next gif in the current list order
- LEFT: display previous gif in the current list order
- giffolder (-gf, --giffolder): path to the .gif folder. Default variable and value: giffolder = 'gifs'
- check_ext (-ext, --check_ext): look for a ".gif" extension while checking if a file is a GIF file. Default variable and value: check_ext = True
- check_hdr (-hdr, --check_ext): look for a GIF8 magic number in the file header wile checking if a file is a GIF file. Default variable and value: check_hdr = True
- fullscreen (-f, --fullscreen): start directly in fullscreen mode. Default variable and value: fullscreen = False
- scaled (-s, --scaled): start directly in scaled mode. Default variable and value: scaled = False
- loop (-l, --loop): start directly in loop mode. Default variable and value: loop = False
- loopnumber (-ln, -loopnumber) : switch between infinite-loop mode and k-loop mode. Do not activate loop by default. Default variable and value: loopnumber = None
- default_time (-dt, --default_time): default time in s for 1-frame .gif file. Default variable and value: default_time = 1.1
- recursive .gif loading, from the giffolder starting point then down the sub-folders
- configuration file, including arguments' default value and commands' key binding
- .gif animation and file information (path, name, duration, number of frames, etc.)