


IMCLTGRAYRAMP(3IM)     SDSC IMAGE LIBRARY      IMCLTGRAYRAMP(3IM)



NAME
     ImCltGrayRamp - fill a CLT with a grayscale ramp

SYNOPSIS
     #include "im.h"

     ImClt *ImCltGrayRamp( srcClt, startIndex, endIndex, startGray,
                              endGray, dstClt )
          ImClt     *srcClt;
          int  startIndex;
          int  endIndex;
          int  startGray;
          int  endGray;
          ImClt     *dstClt;


DESCRIPTION
     ImCltGrayRamp creates a grayscale ramp, a linear progression
     of  grayscales,  from _s_t_a_r_t_G_r_a_y value to _e_n_d_G_r_a_y value.  The
     valid range for both _s_t_a_r_t_G_r_a_y and _e_n_d_G_r_a_y is from 0 to 255.
     _e_n_d_G_r_a_y value need not be larger than _s_t_a_r_t_G_r_a_y value.

     The grayscale values are filled in from _s_t_a_r_t_I_n_d_e_x to _e_n_d_I_n_-
     _d_e_x.  _e_n_d_I_n_d_e_x need not be larger than _s_t_a_r_t_I_n_d_e_x.

     _s_r_c_C_l_t is the source CLT to be referenced.   _d_s_t_C_l_t  is  the
     destination CLT to be returned.

     _s_r_c_C_l_t = IMCLTNULL and _d_s_t_C_l_t = IMCLTNEW
          A new _d_s_t_C_l_t is allocated  with  size  _s_t_a_r_t_I_n_d_e_x+1  or
          _e_n_d_I_n_d_e_x+1  (whichever  is  larger)  and then grayscale
          ramped.

     _s_r_c_C_l_t = IMCLTNULL and _d_s_t_C_l_t points to a CLT
          The _d_s_t_C_l_t is grayscale ramped.

     _s_r_c_C_l_t points to a CLT and _d_s_t_C_l_t = IMCLTNEW
          The _s_r_c_C_l_t is duplicated  into  _d_s_t_C_l_t  and  _d_s_t_C_l_t  is
          grayscale ramped.

     _s_r_c_C_l_t points to a CLT and _d_s_t_C_l_t points to a CLT
          and _s_r_c_C_l_t == _d_s_t_C_l_t

          The _d_s_t_C_l_t is grayscale ramped.

     _s_r_c_C_l_t points to a CLT and _d_s_t_C_l_t points to a CLT
          and _s_r_c_C_l_t != _d_s_t_C_l_t

          As many CLT entries in _s_r_c_C_l_t that will fit into _d_s_t_C_l_t
          are  copied  into  _d_s_t_C_l_t  and then _d_s_t_C_l_t is grayscale
          ramped.




SDSC              Last change: August 31, 1992                  1






IMCLTGRAYRAMP(3IM)     SDSC IMAGE LIBRARY      IMCLTGRAYRAMP(3IM)



NOTES
     The _s_r_c_C_l_t and _d_s_t_C_l_t may be the same CLT without unpleasant
     side effects.

RETURNS
     ImCltGrayRamp returns a pointer to the grayscale ramp filled
     CLT or IMCLTNULL.

SEE ALSO
     ImIntro (3IM), ImErrNo  (3IM),  ImCltAlloc  (3IM),  ImCltDup
     (3IM)

AUTHORS
     Dave Nadeau and Toan-Vinh Le
     San Diego Supercomputer Center

CONTACT
     SDSC consultants, (619)534-5100, consult@y1.sdsc.edu





































2                 Last change: August 31, 1992               SDSC



