Instrument Neutral Distributed Interface INDI  1.9.5
Functions
file.c File Reference
#include "dsp.h"
#include <fitsio.h>
#include <time.h>
#include <locale.h>
#include <unistd.h>
#include <jpeglib.h>

Go to the source code of this file.

Functions

dsp_stream_pdsp_file_read_fits (char *filename, int *channels, int stretch)
 Read a FITS file and fill a dsp_stream_p with its content. More...
 
void * dsp_file_write_fits (int bpp, size_t *memsize, dsp_stream_p stream)
 Write the components dsp_stream_p array into a FITS file,. More...
 
dsp_stream_pdsp_file_read_jpeg (char *filename, int *channels, int stretch)
 Read a JPEG file and fill a array of dsp_stream_p with its content, each color channel has its own stream in this array and an additional grayscale at end will be added. More...
 
void dsp_file_write_jpeg_composite (char *filename, int components, int quality, dsp_stream_p *stream)
 Write the components dsp_stream_p array into a JPEG file,. More...
 
dsp_stream_pdsp_stream_from_components (dsp_t *buf, int dims, int *sizes, int components)
 
dsp_stream_pdsp_buffer_rgb_to_components (void *buf, int dims, int *sizes, int components, int bpp, int stretch)
 
void dsp_buffer_components_to_rgb (dsp_stream_p *stream, void *rgb, int components, int bpp)
 

Function Documentation

◆ dsp_buffer_components_to_rgb()

void dsp_buffer_components_to_rgb ( dsp_stream_p stream,
void *  rgb,
int  components,
int  bpp 
)

Definition at line 436 of file file.c.

◆ dsp_buffer_rgb_to_components()

dsp_stream_p* dsp_buffer_rgb_to_components ( void *  buf,
int  dims,
int *  sizes,
int  components,
int  bpp,
int  stretch 
)

Definition at line 364 of file file.c.

◆ dsp_file_read_fits()

dsp_stream_p* dsp_file_read_fits ( char *  filename,
int *  channels,
int  stretch 
)

Read a FITS file and fill a dsp_stream_p with its content.

Parameters
filenamethe file name.
stretch1 if the buffer intensities have to be stretched
Returns
The new dsp_stream_p structure pointer

Definition at line 26 of file file.c.

◆ dsp_file_read_jpeg()

dsp_stream_p* dsp_file_read_jpeg ( char *  filename,
int *  channels,
int  stretch 
)

Read a JPEG file and fill a array of dsp_stream_p with its content, each color channel has its own stream in this array and an additional grayscale at end will be added.

Parameters
filenamethe file name.
channelsthis value will be updated with the channel quantity into the picture.
stretch1 if the buffer intensities have to be stretched
Returns
The new dsp_stream_p structure pointers array

Definition at line 256 of file file.c.

◆ dsp_file_write_fits()

void* dsp_file_write_fits ( int  bpp,
size_t *  memsize,
dsp_stream_p  stream 
)

Write the components dsp_stream_p array into a FITS file,.

Parameters
filenamethe file name.
componentsthe number of streams in the array to be used as components 1 or 3.
bppthe bit depth of the output JPEG file [8,16,32,64,-32,-64].
streamthe input stream to be saved

Definition at line 147 of file file.c.

◆ dsp_file_write_jpeg_composite()

void dsp_file_write_jpeg_composite ( char *  filename,
int  components,
int  quality,
dsp_stream_p stream 
)

Write the components dsp_stream_p array into a JPEG file,.

Parameters
filenamethe file name.
componentsthe number of streams in the array to be used as components 1 or 3.
qualitythe quality of the output JPEG file 0-100.
streamthe input stream to be saved

Definition at line 294 of file file.c.

◆ dsp_stream_from_components()

dsp_stream_p* dsp_stream_from_components ( dsp_t buf,
int  dims,
int *  sizes,
int  components 
)

Definition at line 339 of file file.c.