Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!oliveb!sun!wind!naughton From: naughton%wind@Sun.COM (Patrick Naughton) Newsgroups: comp.graphics Subject: Re: Executioner format GIF images question Summary: C program to convert them to normal GIF files. Message-ID: <94388@sun.Eng.Sun.COM> Date: 16 Mar 89 22:12:46 GMT References: <1143@jhunix.HCF.JHU.EDU> Sender: news@sun.Eng.Sun.COM Reply-To: naughton@sun.com (Patrick Naughton) Organization: Sun Microsystems, Mountain View Lines: 47 In article <1143@jhunix.HCF.JHU.EDU> ins_ajbh@jhunix.HCF.JHU.EDU (JABBA) writes: >Is there some easy way to convert the executioner format >images on umn-cs.cs.umn.edu into real gif pictures under >UNIX? > >jim Sure... I looked at the files there for a second and wrote this little hack. have fun. -Patrick --start of included file iigif.c-------------------------------------------- /* iigif.c - converts Apple II "executioner" format GIF images to binary */ #include main() { char buffer[81]; char *val = "xx"; int i, len, n; do { fgets(buffer, 80, stdin); fprintf(stderr, "%s", buffer); } while (strcmp(buffer, "F00G\n") && (!feof(stdin))); while (!feof(stdin)) { fgets(buffer, 80, stdin); len = strlen(buffer); for (i = 0; i < len - 2; i += 2) { val[0] = buffer[i]; val[1] = buffer[i + 1]; sscanf(val, "%x", &n); printf("%c", n); } } exit(0); } --end of included file iigif.c---------------------------------------------- ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@Sun.COM Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080