![]() |
simage
1.8.4
Coin3D texture image library
|
#include <config.h>#include <simage_tiff.h>#include <stdio.h>#include <tiffio.h>#include <string.h>#include <stdarg.h>#include <stdlib.h>Data Structures | |
| struct | simage_tiff_opendata |
Macros | |
| #define | CVT(x) (((x) * 255L) / ((1L<<16)-1)) |
| #define | ERR_MEM 3 |
| #define | ERR_NO_ERROR 0 |
| #define | ERR_OPEN 1 |
| #define | ERR_OPEN_WRITE 6 |
| #define | ERR_READ 2 |
| #define | ERR_TIFFLIB 5 |
| #define | ERR_UNSUPPORTED 4 |
| #define | ERR_WRITE 7 |
| #define | pack(a, b) ((a)<<8 | (b)) |
Functions | |
| static int | checkcmap (int n, uint16 *r, uint16 *g, uint16 *b) |
| static void | copy_row (unsigned char *ptr, unsigned char *data, int n, int numcomponents) |
| static void | interleave_row (unsigned char *ptr, unsigned char *red, unsigned char *blue, unsigned char *green, unsigned char *alpha, int n) |
| static void | invert_row (unsigned char *ptr, unsigned char *data, int n, int invert) |
| static void | remap_row (unsigned char *ptr, unsigned char *data, int n, unsigned short *rmap, unsigned short *gmap, unsigned short *bmap, unsigned char *amap) |
| void | simage_tiff_close (void *opendata) |
| int | simage_tiff_error (char *buffer, int buflen) |
| int | simage_tiff_identify (const char *ptr, const unsigned char *header, int headerlen) |
| unsigned char * | simage_tiff_load (const char *filename, int *width_ret, int *height_ret, int *numComponents_ret) |
| void * | simage_tiff_open (const char *filename, int *width, int *height, int *numcomponents) |
| int | simage_tiff_read_line (void *opendata, int y, unsigned char *buf) |
| int | simage_tiff_save (const char *filename, const unsigned char *bytes, int width, int height, int numcomponents) |
| static void | tiff_error (const char *module, const char *fmt, va_list list) |
| static int | tiff_try_read_rgba (TIFF *in, int w, int h, int format, unsigned char *buffer) |
| static void | tiff_warn (const char *module, const char *fmt, va_list list) |
Variables | |
| static int | tifferror = 0 |
| #define CVT | ( | x | ) | (((x) * 255L) / ((1L<<16)-1)) |
| #define ERR_MEM 3 |
| #define ERR_NO_ERROR 0 |
| #define ERR_OPEN 1 |
| #define ERR_OPEN_WRITE 6 |
| #define ERR_READ 2 |
| #define ERR_TIFFLIB 5 |
| #define ERR_UNSUPPORTED 4 |
| #define ERR_WRITE 7 |
| #define pack | ( | a, | |
| b ) ((a)<<8 | (b)) |
|
static |
|
static |
|
static |
|
static |
|
static |
| void simage_tiff_close | ( | void * | opendata | ) |
| int simage_tiff_error | ( | char * | buffer, |
| int | buflen ) |
| int simage_tiff_identify | ( | const char * | ptr, |
| const unsigned char * | header, | ||
| int | headerlen ) |
| unsigned char * simage_tiff_load | ( | const char * | filename, |
| int * | width_ret, | ||
| int * | height_ret, | ||
| int * | numComponents_ret ) |
| void * simage_tiff_open | ( | const char * | filename, |
| int * | width, | ||
| int * | height, | ||
| int * | numcomponents ) |
| int simage_tiff_read_line | ( | void * | opendata, |
| int | y, | ||
| unsigned char * | buf ) |
| int simage_tiff_save | ( | const char * | filename, |
| const unsigned char * | bytes, | ||
| int | width, | ||
| int | height, | ||
| int | numcomponents ) |
|
static |
|
static |
|
static |
|
static |