Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

psImageJpeg.h

Go to the documentation of this file.
00001 /** @file  psImageJpeg.h
00002  *
00003  * the functions to generate JPEG images from psImage
00004  */
00005 
00006 #ifndef PS_IMAGE_JPEG_H
00007 #define PS_IMAGE_JPEG_H
00008 
00009 #include "psImage.h"
00010 
00011 typedef struct
00012 {
00013     psVector *red;                      // Red colormap
00014     psVector *green;                    // Green colormap
00015     psVector *blue;                     // Blue colormap
00016 }
00017 psImageJpegColormap;
00018 
00019 #define PS_JPEG_RANGELIM(A)(PS_MAX(0,PS_MIN(255,(A))))
00020 
00021 #define PS_JPEG_SCALEVALUE(VALUE,ZERO,SCALE)(PS_MAX(0,PS_MIN(255,(SCALE*(VALUE-ZERO)))))
00022 
00023 // allocate a colormap (does not define the map values)
00024 psImageJpegColormap *psImageJpegColormapAlloc();
00025 
00026 // set the colormap values using the supplied name
00027 psImageJpegColormap *psImageJpegColormapSet(psImageJpegColormap *map, // Colormap to set
00028         const char *name // Name of colormap
00029                                            );
00030 
00031 // write out a JPEG file using the supplied image and colormap
00032 // output goes to the specified filename
00033 bool psImageJpeg(const psImageJpegColormap *map, // Color map
00034                  const psImage *image,  // Image to write
00035                  const char *filename,  // Filename of JPEG
00036                  float min, float max   // Minimum and maximum values
00037                 );
00038 
00039 #endif /* PS_IMAGE_JPEG_H */

Generated on Mon Jul 3 14:13:44 2006 for Pan-STARRS Foundation Library by  doxygen 1.4.4