00001
00002
00003
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;
00014 psVector *green;
00015 psVector *blue;
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
00024 psImageJpegColormap *psImageJpegColormapAlloc();
00025
00026
00027 psImageJpegColormap *psImageJpegColormapSet(psImageJpegColormap *map,
00028 const char *name
00029 );
00030
00031
00032
00033 bool psImageJpeg(const psImageJpegColormap *map,
00034 const psImage *image,
00035 const char *filename,
00036 float min, float max
00037 );
00038
00039 #endif