Skip to content

martinpoljak/gif-info

Repository files navigation

Gif Info

gif-info is analyzer of the GIF image format. It performs complete analysis of internal GIF block structure and streams it as an "object stream" with metainformations of each block. Also can interpret internal structure by providing the simple object-like interface to base image file informations. Works above all seekable IO streams, so allows processing of the big files too. Doesn't perform LZW decompressing, returns raw data for both color tables and images.

Two different approaches are available: sequential and static. First one yields "stream" of objects which are equivalent to functional blocks in the GIF file and which contain low-level GIF data. It's equivalent of for example SAX parser although, of sure, less complex. The other one provides classical single object-like access to interpreted file informations.

Examples of both are available in the bin directory. git-info command writes out content of the static information object, git-dump dumps content of low level blocks stream.

Modifiing the file and writing changes back is possible (see StructFx library documentation). It isn't implemented directly by this library, but should be easy to implement it if you will need it -- with exception of data blocks as comments or image data -- it's necessary split them to blocks manually in your writing routine. Other structures provided by the library contains binary serialization routines implicitly.

Copyright

Copyright © 2011 – 2016 Martin Poljak. See LICENSE.txt for further details.

About

Pure Ruby analyzer of the GIF image format.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages