IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 25, 2010, 12:54:22 PM (16 years ago)
Author:
eugene
Message:

merge changes from eam_branches/ipp-20100823

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/jpeg/psImageJpeg.h

    r23486 r29542  
    1515#include "psImage.h"
    1616
    17 typedef struct
    18 {
    19     psVector *red;                      // Red colormap
    20     psVector *green;                    // Green colormap
    21     psVector *blue;                     // Blue colormap
    22 }
    23 psImageJpegColormap;
     17typedef enum {
     18  PS_JPEG_SHOWSCALE_NONE,
     19  PS_JPEG_SHOWSCALE_TOP,
     20  PS_JPEG_SHOWSCALE_BOTTOM
     21} psImageJpegShowScaleOption; 
     22
     23typedef 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;
    2436
    2537#define PS_JPEG_RANGELIM(A)(PS_MAX(0,PS_MIN(255,(A))))
    26 
    2738#define PS_JPEG_SCALEVALUE(VALUE,ZERO,SCALE)(PS_MAX(0,PS_MIN(255,(SCALE*(VALUE-ZERO)))))
    2839
     40#define PS_JPEG_COLORPAD 10
     41#define PS_JPEG_LABELPAD 12
     42
    2943// allocate a colormap (does not define the map values)
    30 psImageJpegColormap *psImageJpegColormapAlloc(void) PS_ATTR_MALLOC;
     44psImageJpegOptions *psImageJpegOptionsAlloc(void) PS_ATTR_MALLOC;
    3145
    3246// set the colormap values using the supplied name
    33 psImageJpegColormap *psImageJpegColormapSet(psImageJpegColormap *map, // Colormap to set
    34         const char *name // Name of colormap
    35                                            );
     47bool psImageJpegColormapSet(psImageJpegOptions *options, // Colormap to set
     48                            const char *name // Name of colormap
     49                            );
    3650
    3751// write out a JPEG file using the supplied image and colormap
    3852// output goes to the specified filename
    39 bool psImageJpeg(const psImageJpegColormap *map, // Color map
     53bool psImageJpeg(const psImageJpegOptions *options, // Color map
    4054                 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
     59bDrawBuffer *psImageJpegOverlayInit (const psImage *image);
    4460
    4561/// @}
Note: See TracChangeset for help on using the changeset viewer.