| | |
| | |
| | |
| | |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | #ifndef VL_PGM_H |
| | #define VL_PGM_H |
| |
|
| | #include "generic.h" |
| | #include "mathop.h" |
| | #include <stdio.h> |
| |
|
| | |
| | |
| | #define VL_ERR_PGM_INV_HEAD 101 |
| | #define VL_ERR_PGM_INV_META 102 |
| | #define VL_ERR_PGM_INV_DATA 103 |
| | #define VL_ERR_PGM_IO 104 |
| | |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | typedef struct _VlPgmImage |
| | { |
| | vl_size width ; |
| | vl_size height ; |
| | vl_size max_value ; |
| | vl_bool is_raw ; |
| | } VlPgmImage ; |
| |
|
| | |
| | |
| | VL_EXPORT int vl_pgm_extract_head (FILE *f, VlPgmImage *im) ; |
| | VL_EXPORT int vl_pgm_extract_data (FILE *f, VlPgmImage const *im, void *data) ; |
| | VL_EXPORT int vl_pgm_insert (FILE *f, |
| | VlPgmImage const *im, |
| | void const*data ) ; |
| | VL_EXPORT vl_size vl_pgm_get_npixels (VlPgmImage const *im) ; |
| | VL_EXPORT vl_size vl_pgm_get_bpp (VlPgmImage const *im) ; |
| | |
| |
|
| | |
| | |
| | VL_EXPORT int vl_pgm_write (char const *name, |
| | vl_uint8 const *data, |
| | int width, int height) ; |
| | VL_EXPORT int vl_pgm_write_f (char const *name, |
| | float const *data, |
| | int width, int height) ; |
| | VL_EXPORT int vl_pgm_read_new (char const *name, |
| | VlPgmImage *im, |
| | vl_uint8 **data) ; |
| | VL_EXPORT int vl_pgm_read_new_f (char const *name, |
| | VlPgmImage *im, |
| | float **data) ; |
| |
|
| | |
| |
|
| | |
| | #endif |
| |
|