Python extension for writing jpegs for image arrays in MEFs. More...
#include <Python.h>#include "dataops.h"#include "fitsutil.h"#include "jpeglib.h"
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 [] |
Python extension for writing jpegs for image arrays in MEFs.
| #define SIGN | ( | a, | |||
| b | ) | ((b) >= 0.0 ? fabs(a) : -fabs(a)) |
Referenced by mef2jpeg().
| 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] |
References get_cds(), get_height(), get_jbuffer(), get_maxmin(), get_rawimage(), get_width(), handle_fitsio_error(), scaleasinh(), SIGN, and write_jpeg().
| void write_jpeg | ( | JSAMPLE * | jbuffer, | |
| int | npixx, | |||
| int | npixy, | |||
| char * | filename, | |||
| int | quality | |||
| ) |
Referenced by mef2jpeg().
PyMethodDef jpeg_funcs[] [static] |
{
{"mef2jpeg", (PyCFunction)mef2jpeg, METH_KEYWORDS, mef2jpeg_docs},
{NULL}
}
Referenced by initjpeg().
char mef2jpeg_docs[] [static] |
"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))"
1.6.3