NAME

     gray_multiply - multiplies each pixel by a fixed ratio

SYNOPSIS

      #include <CVIPtoolkit.h>
      #include <CVIPimage.h>
      #include <CVIPmatrix.h>

     Image *gray_multiply2(Image *input,float ratio)

      <input> - pointer to an Image
      <ratio> - multiplier

PATH

     $CVIPHOME/HISTOGRAM/graylevel_mod.c

DESCRIPTION

     gray_multiply2 first casts the  input  image  to  CVIP_FLOAT
     image,  then  multiplies each pixel by a fixed value without
     clipping the image data, and returns a CVIP_FLOAT image.

TYPES AND CONSTANTS

     None

RETURN VALUES

     Pointer to an image

HISTORY

     History information recorded: None

EXAMPLE

      #include <CVIPtoolkit.h>
      #include <CVIPimage.h>
      #include <CVIPconvert.h>
      #include <CVIPview.h>
      #include "histogram.h"
      #define VIEWER "picture"
      #define VIDEO_APP "SunVideo &"

      void main()
      {
      Image *cvipImage;
      IMAGE_FORMAT format;
      char *inputfile,*outputfile;

      setDisplay_Image(VIEWER, "Default");

      print_CVIP("\n\t\tEnter the Input File Name:  ");
      inputfile =(char *) getString_CVIP();
      format = getFormat_CVIP(inputfile);
      cvipImage = read_Image(inputfile, 1);
      view_Image(cvipImage, inputfile);
      free(inputfile);
      /* the following call multiplies each pixel value by
      a factor of 2.0,without clipping at 255 */
      cvipImage = gray_multiply2(cvipImage,2.0);
      print_CVIP("\n\t\tEnter the Output File Name:  ");
      outputfile = getString_CVIP();
      view_Image(cvipImage,outputfile);
      write_Image(cvipImage,outputfile,CVIP_NO,CVIP_NO,format,1);
      free(outputfile);
      }

SEE ALSO

     libhisto, gray_multiply(3).

AUTHOR

     Copyright (C) 1996 SIUE - by Scott E. Umbaugh  and  Yansheng
     Wei.