Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mcnc!rutgers!ucla-cs!zen!ucbvax!UF.MSC.UMN.EDU!john From: john@UF.MSC.UMN.EDU (John Salmi) Newsgroups: comp.windows.x Subject: converting suntools icon to X icon Message-ID: <8707281222.AA00965@uf.msc.umn.edu> Date: Tue, 28-Jul-87 08:22:31 EDT Article-I.D.: uf.8707281222.AA00965 Posted: Tue Jul 28 08:22:31 1987 Date-Received: Wed, 29-Jul-87 05:54:15 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 45 this is a quick & dirty hack to transpose your favorite suntools icon to an X-readable icon. if this has already been done, sorry. if not, enjoy! /* foo.c */ #define vax_height 64 #define vax_width 64 static vax_bits[] = { #include "/uf/c/john/images/nude" /* your favorite suntools icon */ }; main() { int i, j, v, new; int len; len = vax_height * vax_width / 16; printf("#define vax_width %d\n", vax_width); printf("#define vax_height %d\n", vax_height); printf("static short vax_bits[] = {"); for(i=0; i < len; i++) { v = vax_bits[i]; new = 0; for(j=0; j < 16; j++) if( v & (01 << j)) new |= (01 << (15-j)); if( (i % 8) == 0) printf("\n\t"); printf("0x%04x,", new & 0xffff); } printf("};\n"); } --- -john salmi -minnesota supercomputer center, inc. -minneapolis internet: john@umn-rei-uc.arpa -or- john@uc.msc.umn.edu uucp: {ihnp4, rutgers!meccts}!umn-cs!umnd-cs!jsalmi " instant asshole - just add alcohol "