Project

gif-info

0.0
No commit activity in last 3 years
No release in over 3 years
Pure Ruby analyzer of the GIF image format. Performs complete analysis of internal GIF block structure and streams it as an objects 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 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.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
>= 0.12.1

Runtime

>= 1.0.0
>= 0.1.1
 Project Readme

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.