jpeg.c File Reference

Python extension for writing jpegs for image arrays in MEFs. More...

#include <Python.h>
#include "dataops.h"
#include "fitsutil.h"
#include "jpeglib.h"
Include dependency graph for jpeg.c:

Defines

#define SIGN(a, b)   ((b) >= 0.0 ? fabs(a) : -fabs(a))

Functions

void get_jbuffer (JSAMPLE *jbuffer, float *buffer, int npixx, int npixy, int binsize)
void write_jpeg (JSAMPLE *jbuffer, int npixx, int npixy, char *filename, int quality)
static PyObject * mef2jpeg (PyObject *self, PyObject *args, PyObject *kwds)
void initjpeg (void)

Variables

static char mef2jpeg_docs []
static PyMethodDef jpeg_funcs []

Detailed Description

Python extension for writing jpegs for image arrays in MEFs.

Author:
Ian Bond, IfA, University of Edinburgh

Define Documentation

#define SIGN ( a,
 )     ((b) >= 0.0 ? fabs(a) : -fabs(a))

Referenced by mef2jpeg().


Function Documentation

void get_jbuffer ( JSAMPLE *  jbuffer,
float *  buffer,
int  npixx,
int  npixy,
int  binsize 
)

References get_binned().

Referenced by mef2jpeg().

void initjpeg ( void   ) 

References jpeg_funcs.

static PyObject* mef2jpeg ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
) [static]
void write_jpeg ( JSAMPLE *  jbuffer,
int  npixx,
int  npixy,
char *  filename,
int  quality 
)

Referenced by mef2jpeg().


Variable Documentation

PyMethodDef jpeg_funcs[] [static]
Initial value:
 {
  {"mef2jpeg", (PyCFunction)mef2jpeg, METH_KEYWORDS, mef2jpeg_docs},
  {NULL}
}

Referenced by initjpeg().

char mef2jpeg_docs[] [static]
Initial value:
  "Make compressed JPEGs from MEF images.\n\
   \n\
   @param hdumap:    Dictionary of output file names referenced by \
                     HDU number.\n\
   @type  hdumap:    dict(int:str)\n\
   @param mef:       Name of FITS MEF file.\n\
   @type  mef:       str\n\
   @param coordfile: Name arrow co-ordinate file to use for this JPEG.\n\
   @type  coordfile: str\n\
   @param scrunch:   Reduce number of pixels by this factor.\n\
   @type  scrunch:   int\n\
   @param quality:   JPEG compression quality (percentage).\n\
   @type  quality:   int\n\
   @param contrast:  Greyscale contrast (fraction).\n\
   @type  contrast:  float\n\
   @param neoverlay: If True, overlay a North-East direction indicator.\n\
   @type  neoverlay: bool\n\
   @param theta:     Radians to rotate image by.\n\
   @type  theta:     float\n\
   \n\
   @return: Dictionary of maximum, minimum and median pixel values in original\
            image referenced by HDU number.\n\
   @rtype:  dict(int:tuple(float, float, float))"
Generated on Mon Oct 4 10:39:51 2010 for WsaTools by  doxygen 1.6.3