simage  1.8.3
Coin3D texture image library
Loading...
Searching...
No Matches
simage_jpeg.c File Reference
#include <config.h>
#include <stdio.h>
#include <setjmp.h>
#include <string.h>
#include <stdlib.h>
#include <jpeglib.h>
#include "simage_jpeg_reader.icc"
#include "simage_jpeg_writer.icc"

Data Structures

struct  my_error_mgr
 

Macros

#define ERR_JPEGLIB   3
 
#define ERR_JPEGLIB_WRITE   5
 
#define ERR_MEM   2
 
#define ERR_NO_ERROR   0
 
#define ERR_OPEN   1
 
#define ERR_OPEN_WRITE   4
 

Typedefs

typedef struct my_error_mgrmy_error_ptr
 

Functions

static unsigned char * copyScanline (unsigned char *currPtr, unsigned char *from, int cnt)
 
static void my_error_exit (j_common_ptr cinfo)
 
int simage_jpeg_error (char *buffer, int buflen)
 
int simage_jpeg_identify (const char *ptr, const unsigned char *header, int headerlen)
 
unsigned char * simage_jpeg_load (const char *filename, int *width_ret, int *height_ret, int *numComponents_ret)
 
int simage_jpeg_save (const char *filename, const unsigned char *bytes, int width, int height, int numcomponents)
 

Variables

static int jpegerror = 0
 

Macro Definition Documentation

◆ ERR_JPEGLIB

#define ERR_JPEGLIB   3

◆ ERR_JPEGLIB_WRITE

#define ERR_JPEGLIB_WRITE   5

◆ ERR_MEM

#define ERR_MEM   2

◆ ERR_NO_ERROR

#define ERR_NO_ERROR   0

◆ ERR_OPEN

#define ERR_OPEN   1

◆ ERR_OPEN_WRITE

#define ERR_OPEN_WRITE   4

Typedef Documentation

◆ my_error_ptr

typedef struct my_error_mgr* my_error_ptr

Function Documentation

◆ copyScanline()

static unsigned char * copyScanline ( unsigned char * currPtr,
unsigned char * from,
int cnt )
static

◆ my_error_exit()

static void my_error_exit ( j_common_ptr cinfo)
static

◆ simage_jpeg_error()

int simage_jpeg_error ( char * buffer,
int buflen )

◆ simage_jpeg_identify()

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

◆ simage_jpeg_load()

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

◆ simage_jpeg_save()

int simage_jpeg_save ( const char * filename,
const unsigned char * bytes,
int width,
int height,
int numcomponents )

Variable Documentation

◆ jpegerror

int jpegerror = 0
static