This patch to giftool 1.0 (the README says "version 0.9 (a beta release)") does the following: - fixes a very nasty bug in the GIF-writing code that caused it to crash on images of certain sizes (e.g., 256 x 192), thereby destroying such images if the -B option was in effect - removes duplicated text from the license-info screen - documents a missing option on the usage screen - fixes some minor typos in writeGIF.c The original program is at http://www.homepages.com/tools/giftool/ . Greg Roelofs newt@uchicago.edu 960602 *** readGIF.c.old Fri Dec 9 11:17:03 1994 --- readGIF.c Fri Apr 5 07:07:50 1996 *************** *** 253,259 **** cur->data.image.cmapSize = 0; } ! cur->data.image.data = (unsigned char *)malloc(cur->width * cur->height); cur->data.image.interlaced = BitSet(buf[8], INTERLACE); readImage(fd, BitSet(buf[8], INTERLACE), cur->width, cur->height, cur->data.image.data); --- 253,260 ---- cur->data.image.cmapSize = 0; } ! /* GRR 960405: putImage() sometimes reads one byte too many: add one here */ ! cur->data.image.data = (unsigned char *)malloc(cur->width * cur->height + 1); cur->data.image.interlaced = BitSet(buf[8], INTERLACE); readImage(fd, BitSet(buf[8], INTERLACE), cur->width, cur->height, cur->data.image.data); *** main.c.old Wed Dec 7 10:31:59 1994 --- main.c Sat May 6 09:49:26 1995 *************** *** 1207,1224 **** printf("is made obvious to the user that GIFTOOL is shareware, and that they should\n"); printf("consider donating, or at least reading this License Info.\n"); printf("\n"); - printf("Permission to use, copy, and distribute GIFTOOL in its entirety, for\n"); - printf("non-commercial purposes, is hereby granted without fee, provided that\n"); - printf("this license information and copyright notice appear in all copies.\n"); - printf("\n"); - printf("Note that distributing GIFTOOL 'bundled' in with ANY product is considered\n"); - printf("to be a 'commercial purpose'.\n"); - printf("\n"); - printf("Also note that any copies of GIFTOOL that are distributed MUST be built\n"); - printf("and/or configured to be in their 'unregistered copy' mode, so that it\n"); - printf("is made obvious to the user that GIFTOOL is shareware, and that they should\n"); - printf("consider donating, or at least reading this License Info.\n"); - printf("\n"); printf("The software may be modified for your own purposes, but modified\n"); printf("versions may NOT be distributed without prior consent of the author.\n"); printf("\n"); --- 1207,1212 ---- *************** *** 1257,1262 **** --- 1245,1251 ---- fprintf(stderr,"Usage: giftool [options] [file]\n"); fprintf(stderr," giftool (-p|-c|-B) [options] [files...]\n"); fprintf(stderr,"\t-B\tBatch Mode, read and write the same filename\n"); + fprintf(stderr,"\t-O\tOptimize the palette (histogram order)\n"); fprintf(stderr,"\t-i\tSet GIF Interlace mode ON\n"); fprintf(stderr,"\t+i\tSet GIF Interlace mode OFF\n"); fprintf(stderr,"\t-p\tPrint information about file(s)\n"); *************** *** 1270,1276 **** fprintf(stderr,"\n"); fprintf(stderr,"For instance you could say 'giftool -B -i *.gif' to convert all your images\nto interlaced GIF files in one easy step.\n"); fprintf(stderr,"\n"); ! fprintf(stderr,"giftool version 1.0 is Copyright 1994 Home Pages, Inc and is shareware.\n"); fprintf(stderr,"Please, use the -info option to read the licensing information.\n"); exit(1); } --- 1259,1265 ---- fprintf(stderr,"\n"); fprintf(stderr,"For instance you could say 'giftool -B -i *.gif' to convert all your images\nto interlaced GIF files in one easy step.\n"); fprintf(stderr,"\n"); ! fprintf(stderr,"giftool version 1.0-grr is Copyright 1994 Home Pages, Inc and is shareware.\n"); fprintf(stderr,"Please, use the -info option to read the licensing information.\n"); exit(1); } *** writeGIF.c.old Wed Nov 30 18:09:57 1994 --- writeGIF.c Fri Apr 5 07:17:17 1996 *************** *** 30,37 **** /* ppmtogif.c - read a portable pixmap and produce a GIF file ** ! ** Based on GIFENCOD by David Rowley .A ! ** Lempel-Zim compression based on "compress". ** ** Copyright (C) 1989 by Jef Poskanzer. ** --- 30,37 ---- /* ppmtogif.c - read a portable pixmap and produce a GIF file ** ! ** Based on GIFENCOD by David Rowley . ! ** Lempel-Ziv compression based on "compress". ** ** Copyright (C) 1989 by Jef Poskanzer. **