1*324bb76bSAndroid Build Coastguard Worker= History of GIFLIB = 2*324bb76bSAndroid Build Coastguard Worker 3*324bb76bSAndroid Build Coastguard WorkerGIF (Graphics Interchange Format) was originally developed on the 4*324bb76bSAndroid Build Coastguard WorkerCompuServe timesharing service in the late 1980s. It was described 5*324bb76bSAndroid Build Coastguard Workerby a GIF standard issued in 1987 and revised in 1989. A copy of the 6*324bb76bSAndroid Build Coastguard WorkerGIF89 standard is included in the doc/ directory. 7*324bb76bSAndroid Build Coastguard Worker 8*324bb76bSAndroid Build Coastguard WorkerThis code originated as a linkable library for DOS programs, together 9*324bb76bSAndroid Build Coastguard Workerwith command-line tools for generating and viewing and analyzing GIF 10*324bb76bSAndroid Build Coastguard Workerimages. The DOS code was written by Gershon Elber using Borland C 11*324bb76bSAndroid Build Coastguard Workerunder MS-DOS sometime between the issue of GIF87 and mid-1989 (1.0 was 12*324bb76bSAndroid Build Coastguard Workerdated 14 June 1989; one portion, getarg.c, was dated 11 Mar 88). 13*324bb76bSAndroid Build Coastguard Worker 14*324bb76bSAndroid Build Coastguard WorkerAt some time no later than the end of 1989 Eric S. Raymond (aka "ESR") 15*324bb76bSAndroid Build Coastguard Workerported this DOS version to System V Unix. Between 1989 and 1992 ESR 16*324bb76bSAndroid Build Coastguard Workerreworked various portions of the API, improving and simplifying 17*324bb76bSAndroid Build Coastguard Workerthe code's interface. 18*324bb76bSAndroid Build Coastguard Worker 19*324bb76bSAndroid Build Coastguard WorkerESR's 2.1 version was the first to include the DGifSlurp()/EGifSpew() 20*324bb76bSAndroid Build Coastguard Workerfunction pair for enabling non-sequential operations on GIF images 21*324bb76bSAndroid Build Coastguard Worker(also the tools icon2gif, gifovly, and gifcompose; the last was 22*324bb76bSAndroid Build Coastguard Workerremoved in 5.0). 23*324bb76bSAndroid Build Coastguard Worker 24*324bb76bSAndroid Build Coastguard WorkerESR's Unix port was incorporated into the NCSA Mosaic browser in 1994, 25*324bb76bSAndroid Build Coastguard Workerwhich is how GIF became (with JPEG) one of the two most popular image 26*324bb76bSAndroid Build Coastguard Workerformats on the early Web. 27*324bb76bSAndroid Build Coastguard Worker 28*324bb76bSAndroid Build Coastguard WorkerBeginning around 1993, patent claims by Unisys over the LZW 29*324bb76bSAndroid Build Coastguard Workercompression method used in GIF theatened adverse legal consequences 30*324bb76bSAndroid Build Coastguard Workerfor users and developers of programs incorporating the format. The 31*324bb76bSAndroid Build Coastguard Workerthreats became serious in 1999, with Unisys demanding license fees 32*324bb76bSAndroid Build Coastguard Workerfor any software using the format. 33*324bb76bSAndroid Build Coastguard Worker 34*324bb76bSAndroid Build Coastguard WorkerOne response to this was the development of PNG in 1995. Another was 35*324bb76bSAndroid Build Coastguard Workerthat ESR sought a lead developer outside the U.S. to hand the project off 36*324bb76bSAndroid Build Coastguard Workerto, and passed it to Toshio Kuratomi. ESR remembers this as happening 37*324bb76bSAndroid Build Coastguard Workerin 1994, but that date could be wrong as some headers imply 3.0 was issued 38*324bb76bSAndroid Build Coastguard Workerunder ESR's name in 1996. But other files do date Toshio's first release 39*324bb76bSAndroid Build Coastguard Workerto 1994. Toshio shipped 4.0 in December 1998. 40*324bb76bSAndroid Build Coastguard Worker 41*324bb76bSAndroid Build Coastguard WorkerSubsequently, the project shipped for some time as "libungif" with 42*324bb76bSAndroid Build Coastguard Workersupport for compressed GIFs removed to avoid the LZW patent issues. 43*324bb76bSAndroid Build Coastguard WorkerCompression support was merged back in after the last blocking patent 44*324bb76bSAndroid Build Coastguard Workerexpired in 2004; this became release 4.0.0. After that merge the 45*324bb76bSAndroid Build Coastguard Workercode was again known as giflib. 46*324bb76bSAndroid Build Coastguard Worker 47*324bb76bSAndroid Build Coastguard WorkerBy 2006, support for PNGs was sufficiently universal that GIF could be 48*324bb76bSAndroid Build Coastguard Workerdescribed as a legacy format. Anything you can do with it GIF could 49*324bb76bSAndroid Build Coastguard Workerprobably be better done with PNG. Nevertheless (and despite efforts 50*324bb76bSAndroid Build Coastguard Workerlike "Burn All GIFs Day" in November 1999) the GIF format has remained 51*324bb76bSAndroid Build Coastguard Workerwidely popular. 52*324bb76bSAndroid Build Coastguard Worker 53*324bb76bSAndroid Build Coastguard WorkerIn April 2012 ESR rejoined the project to do some code cleanups 54*324bb76bSAndroid Build Coastguard Workerand auditing, and Toshio Kuratomi asked him to take back the lead. 55*324bb76bSAndroid Build Coastguard WorkerESR released version 4.2 in May 2012. 56*324bb76bSAndroid Build Coastguard Worker 57*324bb76bSAndroid Build Coastguard WorkerVersion 5.0, released in June 2012, fulfilled almost all the to-do 58*324bb76bSAndroid Build Coastguard Workeritems from 18 years of backlog. It made the library thread-safe, added 59*324bb76bSAndroid Build Coastguard Workerdirect support for GIF89 graphics control blocks, and tossed out large 60*324bb76bSAndroid Build Coastguard Workeramounts of obsolete utility code. 61*324bb76bSAndroid Build Coastguard Worker 62*324bb76bSAndroid Build Coastguard WorkerMore recent version of the code (5.1.0 and onwards) have been hardened 63*324bb76bSAndroid Build Coastguard Workerby both static analysis and fuzz testing. While these failed to turn 64*324bb76bSAndroid Build Coastguard Workerup bugs in normal rendering cases, they did uncover some crash and 65*324bb76bSAndroid Build Coastguard Workercorruption bugs that could be tickled by carefully crafted malformed 66*324bb76bSAndroid Build Coastguard WorkerGIFs. 67*324bb76bSAndroid Build Coastguard Worker 68*324bb76bSAndroid Build Coastguard WorkerThis code is very old, very stable, and *everywhere* - browsers 69*324bb76bSAndroid Build Coastguard Workergame consoles, smartphones, pretty much everything that opens an 70*324bb76bSAndroid Build Coastguard WorkerHTTP port and does graphics uses it. 71*324bb76bSAndroid Build Coastguard Worker 72*324bb76bSAndroid Build Coastguard WorkerThe utilities in this source tree were important as GIF production 73*324bb76bSAndroid Build Coastguard Workertools early in the format's history, but have been superseded by 74*324bb76bSAndroid Build Coastguard Workermulti-format viewers and editors. Most installable binary packages 75*324bb76bSAndroid Build Coastguard Workershipped as 'giflib' include the library and header file only. 76