Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://coin3d.github.io
https://www.kongsberg.com/en/kogt/
simage_pic.c File Reference
#include <config.h>
#include <simage_pic.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

Macros

#define ERROR_NO_ERROR   0
 
#define ERROR_READING_HEADER   1
 
#define ERROR_READING_PALETTE   2
 
#define ERROR_MEMORY   3
 
#define ERROR_READ_ERROR   4
 

Functions

int simage_pic_error (char *buffer, int bufferlen)
 
static int readint16 (FILE *fp, int *res)
 
int simage_pic_identify (const char *ptr, const unsigned char *header, int headerlen)
 
unsigned char * simage_pic_load (const char *filename, int *width_ret, int *height_ret, int *numComponents_ret)
 

Variables

static int picerror = 0
 

Macro Definition Documentation

◆ ERROR_NO_ERROR

#define ERROR_NO_ERROR   0

◆ ERROR_READING_HEADER

#define ERROR_READING_HEADER   1

◆ ERROR_READING_PALETTE

#define ERROR_READING_PALETTE   2

◆ ERROR_MEMORY

#define ERROR_MEMORY   3

◆ ERROR_READ_ERROR

#define ERROR_READ_ERROR   4

Function Documentation

◆ simage_pic_error()

int simage_pic_error ( char *  buffer,
int  bufferlen 
)

◆ readint16()

static int readint16 ( FILE *  fp,
int *  res 
)
static

◆ simage_pic_identify()

int simage_pic_identify ( const char *  ptr,
const unsigned char *  header,
int  headerlen 
)

◆ simage_pic_load()

unsigned char* simage_pic_load ( const char *  filename,
int *  width_ret,
int *  height_ret,
int *  numComponents_ret 
)

Variable Documentation

◆ picerror

int picerror = 0
static