Changeset 29542 for trunk/psLib/src/jpeg/psImageJpeg.h
- Timestamp:
- Oct 25, 2010, 12:54:22 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/jpeg/psImageJpeg.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/jpeg/psImageJpeg.h
r23486 r29542 15 15 #include "psImage.h" 16 16 17 typedef struct 18 { 19 psVector *red; // Red colormap 20 psVector *green; // Green colormap 21 psVector *blue; // Blue colormap 22 } 23 psImageJpegColormap; 17 typedef enum { 18 PS_JPEG_SHOWSCALE_NONE, 19 PS_JPEG_SHOWSCALE_TOP, 20 PS_JPEG_SHOWSCALE_BOTTOM 21 } psImageJpegShowScaleOption; 22 23 typedef struct { 24 psVector *red; // Red colormap 25 psVector *green; // Green colormap 26 psVector *blue; // Blue colormap 27 psU8 white; // colormap-independent values 28 psU8 black; 29 float min; 30 float max; 31 bool xFlip; 32 bool yFlip; 33 psImageJpegShowScaleOption showScale; 34 // XXX include bDrawBuffer in here? 35 } psImageJpegOptions; 24 36 25 37 #define PS_JPEG_RANGELIM(A)(PS_MAX(0,PS_MIN(255,(A)))) 26 27 38 #define PS_JPEG_SCALEVALUE(VALUE,ZERO,SCALE)(PS_MAX(0,PS_MIN(255,(SCALE*(VALUE-ZERO))))) 28 39 40 #define PS_JPEG_COLORPAD 10 41 #define PS_JPEG_LABELPAD 12 42 29 43 // allocate a colormap (does not define the map values) 30 psImageJpeg Colormap *psImageJpegColormapAlloc(void) PS_ATTR_MALLOC;44 psImageJpegOptions *psImageJpegOptionsAlloc(void) PS_ATTR_MALLOC; 31 45 32 46 // set the colormap values using the supplied name 33 psImageJpegColormap *psImageJpegColormapSet(psImageJpegColormap *map, // Colormap to set34 const char *name // Name of colormap35 );47 bool psImageJpegColormapSet(psImageJpegOptions *options, // Colormap to set 48 const char *name // Name of colormap 49 ); 36 50 37 51 // write out a JPEG file using the supplied image and colormap 38 52 // output goes to the specified filename 39 bool psImageJpeg(const psImageJpeg Colormap *map, // Color map53 bool psImageJpeg(const psImageJpegOptions *options, // Color map 40 54 const psImage *image, // Image to write 41 const char *filename, // Filename of JPEG 42 float min, float max // Minimum and maximum values 43 ); 55 bDrawBuffer *bdbuf, 56 const char *filename // Filename of JPEG 57 ); 58 59 bDrawBuffer *psImageJpegOverlayInit (const psImage *image); 44 60 45 61 /// @}
Note:
See TracChangeset
for help on using the changeset viewer.
