Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
simage_gdiplus.cpp File Reference
#include <config.h>
#include <simage_gdiplus.h>
#include <windows.h>
#include <gdiplus.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <assert.h>

Macros

#define LOCKBITS_RECT_CAST(arg)   &arg
 

Enumerations

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

Functions

static Gdiplus::PixelFormat getReadFormat (Gdiplus::Bitmap &bitmap, bool &grayscale)
 
static unsigned char * copyImageBuffer (unsigned char *src, unsigned int width, unsigned int height, unsigned int numcomponents, unsigned int stride)
 
static unsigned char * copy32bppGrayScaleBuffer (unsigned char *src, unsigned int width, unsigned int height, unsigned int stride)
 
static unsigned char * copy16bppGrayScaleBuffer (unsigned char *src, unsigned int width, unsigned int height, unsigned int stride)
 
static int gdiplus_init (void)
 
int simage_gdiplus_error (char *buffer, int buflen)
 
int simage_gdiplus_identify (const char *ptr, const unsigned char *header, int headerlen)
 
unsigned char * simage_gdiplus_load (const char *filename, int *width, int *height, int *numcomponents)
 
char * simage_gdiplus_get_savers (void)
 
static int GetEncoderClsid (const char *format, CLSID *pClsid)
 
int simage_gdiplus_save (const char *filename, const unsigned char *bytes, int width, int height, int numcomponents, const char *filetypeext)
 
void * simage_gdiplus_open (const char *filename, int *width, int *height, int *numcomponents)
 
void simage_gdiplus_close (void *opendata)
 
int simage_gdiplus_read_line (void *opendata, int y, unsigned char *buf)
 
int simage_gdiplus_read_region (void *opendata, int x, int y, int w, int h, unsigned char *buf)
 

Variables

static int gdipluserror = ERR_NO_ERROR
 

Macro Definition Documentation

◆ LOCKBITS_RECT_CAST

#define LOCKBITS_RECT_CAST (   arg)    &arg

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

◆ getReadFormat()

static Gdiplus::PixelFormat getReadFormat ( Gdiplus::Bitmap &  bitmap,
bool &  grayscale 
)
static

◆ copyImageBuffer()

static unsigned char* copyImageBuffer ( unsigned char *  src,
unsigned int  width,
unsigned int  height,
unsigned int  numcomponents,
unsigned int  stride 
)
static

◆ copy32bppGrayScaleBuffer()

static unsigned char* copy32bppGrayScaleBuffer ( unsigned char *  src,
unsigned int  width,
unsigned int  height,
unsigned int  stride 
)
static

◆ copy16bppGrayScaleBuffer()

static unsigned char* copy16bppGrayScaleBuffer ( unsigned char *  src,
unsigned int  width,
unsigned int  height,
unsigned int  stride 
)
static

◆ gdiplus_init()

static int gdiplus_init ( void  )
static

◆ simage_gdiplus_error()

int simage_gdiplus_error ( char *  buffer,
int  buflen 
)

◆ simage_gdiplus_identify()

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

◆ simage_gdiplus_load()

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

◆ simage_gdiplus_get_savers()

char* simage_gdiplus_get_savers ( void  )

◆ GetEncoderClsid()

static int GetEncoderClsid ( const char *  format,
CLSID *  pClsid 
)
static

◆ simage_gdiplus_save()

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

◆ simage_gdiplus_open()

void* simage_gdiplus_open ( const char *  filename,
int *  width,
int *  height,
int *  numcomponents 
)

◆ simage_gdiplus_close()

void simage_gdiplus_close ( void *  opendata)

◆ simage_gdiplus_read_line()

int simage_gdiplus_read_line ( void *  opendata,
int  y,
unsigned char *  buf 
)

◆ simage_gdiplus_read_region()

int simage_gdiplus_read_region ( void *  opendata,
int  x,
int  y,
int  w,
int  h,
unsigned char *  buf 
)

Variable Documentation

◆ gdipluserror

int gdipluserror = ERR_NO_ERROR
static