home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Web / Utilities / wwwcount-2.3 / combine / syncimg.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-02  |  987 b   |  64 lines

  1. /*
  2.  *    SyncImage()    -    initializes the red, green, and blue intensities of each
  3.  *                    pixel as defined by the colormap index.
  4.  *
  5.  *    RCS:
  6.  *        $Revision: 2.3 $
  7.  *        $Date: 1996/05/03 02:21:34 $
  8.  *
  9.  *    Security:
  10.  *        Unclassified
  11.  *
  12.  *    Description:
  13.  *        Adapted from ImageMagick
  14.  *
  15.  *    Input Parameters:
  16.  *        type    identifier    description
  17.  *
  18.  *        text
  19.  *
  20.  *    Output Parameters:
  21.  *        type    identifier    description
  22.  *
  23.  *        text
  24.  *
  25.  *    Return Values:
  26.  *        value    description
  27.  *
  28.  *    Side Effects:
  29.  *        text
  30.  *
  31.  *    Limitations and Comments:
  32.  *        text
  33.  *
  34.  *    Development History:
  35.  *        when    who        why
  36.  *    3/28/94        mm        first cut
  37.  */
  38. #include "combine.h"
  39. #include "defines.h"
  40.  
  41. void SyncImage(image)
  42. Image
  43.   *image;
  44. {
  45.   register int
  46.     i;
  47.  
  48.   register Runlength
  49.     *p;
  50.  
  51.   register unsigned short
  52.     index;
  53.  
  54.   p=image->pixels;
  55.   for (i=0; i < image->packets; i++)
  56.   {
  57.     index=p->index;
  58.     p->red=image->colormap[index].red;
  59.     p->green=image->colormap[index].green;
  60.     p->blue=image->colormap[index].blue;
  61.     p++;
  62.   }
  63. }
  64.