|
A Portable Floating-Point-Based Image Format
1.0
|
#include <stdio.h>#include <limits.h>
Go to the source code of this file.
Defines | |
| #define | PFI_VERSION "1.2" |
| #define | PFI_EPSILON (3 * DBL_EPSILON) |
| #define | DLL_EXPORT |
| #define | pfi_htof32(x) (x) |
| #define | pfi_ftoh32(x) (x) |
| #define | pfi_htof16(x) (x) |
| #define | pfi_ftoh16(x) (x) |
Enumerations | |
| enum | { pfi_grey = 0, pfi_rgb, pfi_yuv, pfi_unknown } |
Functions | |
| int | pfi_getv (FILE *stream, double *valp) |
| int | pfi_putv (FILE *stream, double val) |
| int | pfi_properties (FILE *stream, int *rows, int *cols, int *colors, int *colormodel) |
| double * | pfi_read (FILE *stream, int *rows, int *cols, int *colors, int *colormodel) |
| int | pfi_write (FILE *stream, double *buf, int rows, int cols, int colors, int colormodel, char *fname) |
| DLL_EXPORT int | pfi_read_name (char *name, int rows, int cols, int colors, double *result) |
| DLL_EXPORT int | pfi_write_name (char *name, double *buf, int rows, int cols, int colors, int colormodel) |
| DLL_EXPORT int | pfi_properties_name (char *name, int *rows, int *cols, int *colors, int *colormodel) |
| #define DLL_EXPORT |
Definition at line 36 of file debian/tmp/usr/include/pfi.h.
| #define PFI_EPSILON (3 * DBL_EPSILON) |
Definition at line 28 of file debian/tmp/usr/include/pfi.h.
| #define pfi_ftoh16 | ( | x | ) | (x) |
Definition at line 131 of file debian/tmp/usr/include/pfi.h.
Referenced by pfi_getv().
| #define pfi_ftoh32 | ( | x | ) | (x) |
Definition at line 129 of file debian/tmp/usr/include/pfi.h.
Referenced by pfi_getv().
| #define pfi_htof16 | ( | x | ) | (x) |
Definition at line 130 of file debian/tmp/usr/include/pfi.h.
Referenced by pfi_putv().
| #define pfi_htof32 | ( | x | ) | (x) |
Definition at line 128 of file debian/tmp/usr/include/pfi.h.
Referenced by pfi_putv().
| #define PFI_VERSION "1.2" |
Definition at line 26 of file debian/tmp/usr/include/pfi.h.
| anonymous enum |
Colormodel specifier. Either greyscale, rgb or yuv.
Definition at line 136 of file debian/tmp/usr/include/pfi.h.
| int pfi_getv | ( | FILE * | stream, |
| double * | valp | ||
| ) |
Reads a double value from an open pfi file
| stream | The open file. |
| valp | A reference to the value to be read. |
Definition at line 380 of file pfi.c.
Referenced by pfi_read_internal().
| int pfi_properties | ( | FILE * | stream, |
| int * | rows, | ||
| int * | cols, | ||
| int * | colors, | ||
| int * | colormodel | ||
| ) |
Gets the pfi image properties from an open file.
| stream | The open file. |
| rows | A reference to the number of rows to be determined from the image header. |
| cols | A reference to the number of cols to be determined from the image header. |
| colors | A reference to the number of colors to be determined from the image header. |
| colormodel | A reference to an integer to represent the colormodel used in this image to be determined from the image header. We use 0 for none (greyscale), 1 for RGB etc. |
Definition at line 489 of file pfi.c.
Referenced by pfi_properties_name(), and pfi_read().
| DLL_EXPORT int pfi_properties_name | ( | char * | name, |
| int * | rows, | ||
| int * | cols, | ||
| int * | colors, | ||
| int * | colormodel | ||
| ) |
Gets the pfi image properties from an image file.
| name | The file name. |
| rows | A reference to the number of rows to be determined from the image header. |
| cols | A reference to the number of cols to be determined from the image header. |
| colors | A reference to the number of colors to be determined from the image header. |
| colormodel | A reference to an integer to represent the colormodel used in this image to be determined from the image header. We use 0 for none (greyscale), 1 for RGB etc. |
| int pfi_putv | ( | FILE * | stream, |
| double | val | ||
| ) |
Writes a double value into an open pfi file.
| stream | The open file. |
| val | The value to be written. |
Definition at line 428 of file pfi.c.
Referenced by pfi_write().
| double* pfi_read | ( | FILE * | stream, |
| int * | rows, | ||
| int * | cols, | ||
| int * | colors, | ||
| int * | colormodel | ||
| ) |
Reads a pfi image from an open file.
| stream | The open file. |
| rows | A reference to the number of rows to be determined from the image header. |
| cols | A reference to the number of cols to be determined from the image header. |
| colors | A reference to the number of colors to be determined from the image header. |
| colormodel | A reference to an integer to represent the colormodel used in this image to be determined from the image header. We use 0 for none (greyscale), 1 for RGB etc. |
| DLL_EXPORT int pfi_read_name | ( | char * | name, |
| int | rows, | ||
| int | cols, | ||
| int | colors, | ||
| double * | result | ||
| ) |
Reads a pfi image.
| name | The file name. |
| rows | the number of rows |
| cols | the number of cols |
| colors | the number of colors |
| result | A double array containing the image. The colors are stored one after another, so we've got pixel one with all colors first, then pixel two etc. |
| int pfi_write | ( | FILE * | stream, |
| double * | buf, | ||
| int | rows, | ||
| int | cols, | ||
| int | colors, | ||
| int | colormodel, | ||
| char * | fname | ||
| ) |
Writes a pfi image to an open file.
| stream | The open file. |
| buf | A reference to the buffer containing the image. The colors are stored one after another, so we've got pixel one with all colors first, then pixel two etc. |
| rows | A reference to the number of rows to be determined from the image header. |
| cols | A reference to the number of cols to be determined from the image header. |
| colors | A reference to the number of colors to be determined from the image header. |
| colors | A reference to the number of colors to be determined from the image header. |
| colormodel | An integer to represent the colormodel used in this image. We use 0 for none (greyscale), 1 for RGB etc. |
| fname | The name which will be written to the file header. |
Definition at line 715 of file pfi.c.
Referenced by pfi_write_name().
| DLL_EXPORT int pfi_write_name | ( | char * | name, |
| double * | buf, | ||
| int | rows, | ||
| int | cols, | ||
| int | colors, | ||
| int | colormodel | ||
| ) |
Opens and writes a pfi image.
| name | The file name. |
| buf | A reference to the buffer containing the image. The colors are stored one after another, so we've got pixel one with all colors first, then pixel two etc. |
| rows | A reference to the number of rows to be determined from the image header. |
| cols | A reference to the number of cols to be determined from the image header. |
| colors | A reference to the number of colors to be determined from the image header. |
| colors | A reference to the number of colors to be determined from the image header. |
| colormodel | An integer to represent the colormodel used in this image. We use 0 for none (greyscale), 1 for RGB etc. |
1.7.6.1