#ifndef lint static char SccsId[] = "%W% %G%"; #endif /* Module: imglogo.c * Purpose: Put logo in image buffer * Subroutine: color_logo() returns: void * Subroutine: load_logo() returns: void * Xlib calls: none * Copyright: 1989 Smithsonian Astrophysical Observatory * You may do anything you like with this file except remove * this copyright. The Smithsonian Astrophysical Observatory * makes no representations about the suitability of this * software for any purpose. It is provided "as is" without * express or implied warranty. * Modified: {0} Michael VanHilst initial version 25 April 1990 */ /* image values of various features of the logo */ #define SUNN 201 #define SURND 1 #define BKGD 200 #define LET 0 /* dimensions of the uncoded and code logo image */ #define LOGO_WIDTH 176 #define LOGO_HEIGHT 197 #define LOGO_SZ 3444 /* * Subroutine: color_logo * Purpose: redirect lookup table to map parts of logo to static colors */ void color_logo ( lookup, blue, yellow ) unsigned char *lookup; int blue; int yellow; { lookup[SURND] = (unsigned char)blue; lookup[SUNN] = (unsigned char)yellow; } /* * Subroutine: make_logo * Purpose: decode run-length encoded saoimage logo into short buffer */ static void make_logo ( logo, logo_len, buf, buf_width ) register unsigned char *logo; int logo_len; short *buf; int buf_width; { int i, j, val, cnt; register int x; int run, line; register short *ob; unsigned char *logo_end; logo_end = logo + logo_len; while( logo < logo_end ) { line = *logo; logo++; cnt = *logo; logo++; ob = &buf[line * buf_width]; x = 0; for( i = 0; i < cnt; i++ ) { run = *logo; logo++; val = *logo; logo++; for( j=0; j