Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
simage_cgimage.c File Reference
#include <simage_cgimage.h>
#include <CoreFoundation/CoreFoundation.h>
#include <ApplicationServices/ApplicationServices.h>

Enumerations

enum  {
  ERR_NO_ERROR, ERR_OPEN, ERR_READ, ERR_MEM,
  ERR_OPEN_WRITE, ERR_WRITE, ERR_NOT_IMPLEMENTED, ERR_INIT
}
 

Functions

static CGImageSourceRef create_image_source (const char *file)
 
int simage_cgimage_error (char *cstr, int buflen)
 
int simage_cgimage_identify (const char *file, const unsigned char *header, int headerlen)
 
unsigned char * simage_cgimage_load (const char *file, int *width, int *height, int *numcomponents)
 
char * simage_cgimage_get_savers (void)
 
int simage_cgimage_save (const char *filename, const unsigned char *bytes, int width, int height, int numcomponents, const char *ext)
 

Variables

static int cgimageerror = ERR_NO_ERROR
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ERR_NO_ERROR 
ERR_OPEN 
ERR_READ 
ERR_MEM 
ERR_OPEN_WRITE 
ERR_WRITE 
ERR_NOT_IMPLEMENTED 
ERR_INIT 

Function Documentation

◆ create_image_source()

static CGImageSourceRef create_image_source ( const char *  file)
static

◆ simage_cgimage_error()

int simage_cgimage_error ( char *  cstr,
int  buflen 
)

◆ simage_cgimage_identify()

int simage_cgimage_identify ( const char *  file,
const unsigned char *  header,
int  headerlen 
)

◆ simage_cgimage_load()

unsigned char* simage_cgimage_load ( const char *  file,
int *  width,
int *  height,
int *  numcomponents 
)

◆ simage_cgimage_get_savers()

char* simage_cgimage_get_savers ( void  )

◆ simage_cgimage_save()

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

Variable Documentation

◆ cgimageerror

int cgimageerror = ERR_NO_ERROR
static