## NAME

         read_Image - loads an Image structure  with  data  from  the
                        specified image file

## SYNOPSIS

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

         Image *read_Image(char *filename, int showmessages)

          <filename> - pointer to an character string containing  the
         file name
          <showmessages> - shall I be verbose?

## PATH

         $CVIPHOME/CONVERSION/convert.c

## DESCRIPTION

         Loads an Image structure with data from the specified  image
         file  <filename>. All data members of the structure are ini-
         tialized to the specifications of the image file read in.

## TYPES AND CONSTANTS

## RETURN VALUES

         Pointer to newly allocated Image structure loaded with  data
         from image <filename>

## HISTORY

         History information recorded: None

## EXAMPLE

          #include <CVIPtoolkit.h>
          #include <CVIPimage.h>
          #include <CVIPdef.h>
          #include <CVIPview.h>
          #include <CVIPconvert.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);
          /* the following call loads an image  structure  with  data
         from
          the specified file */
          cvipImage = read_Image(inputfile,1);
          view_Image(cvipImage, inputfile);
          free(inputfile);
          print_CVIP("\n\t\tEnter the Output File Name:  ");
          outputfile = getString_CVIP();
          view_Image(cvipImage,outputfile);
          /* the following call writes the contents of the CVIP image
          structure out to disk.The format is the same as the
          input file format */
          write_Image(cvipImage,outputfile,CVIP_NO,CVIP_NO,format,1);
          free(outputfile);
          }

## SEE ALSO

         libconverter

## AUTHOR

         Copyright (C) 1996 SIUE -  by  Scott  E.  Umbaugh  and  Greg
         Hance.