![]() |
Coin3D is Free Software, published under the BSD 3-clause license. |
https://coin3d.github.io https://www.kongsberg.com/en/kogt/ |
#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>
Go to the source code of this file.
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 |
#define LOCKBITS_RECT_CAST | ( | arg | ) | arg |
Definition at line 52 of file simage_gdiplus.cpp.
Referenced by simage_gdiplus_load(), simage_gdiplus_read_line(), simage_gdiplus_read_region(), and simage_gdiplus_save().
anonymous enum |
Enumerator | |
---|---|
ERR_NO_ERROR | |
ERR_OPEN | |
ERR_READ | |
ERR_MEM | |
ERR_OPEN_WRITE | |
ERR_WRITE | |
ERR_NOT_IMPLEMENTED | |
ERR_INIT |
Definition at line 55 of file simage_gdiplus.cpp.
|
static |
Definition at line 247 of file simage_gdiplus.cpp.
Referenced by simage_gdiplus_load().
|
static |
Definition at line 205 of file simage_gdiplus.cpp.
Referenced by simage_gdiplus_load().
|
static |
Definition at line 142 of file simage_gdiplus.cpp.
Referenced by simage_gdiplus_load().
|
static |
Definition at line 274 of file simage_gdiplus.cpp.
Referenced by simage_gdiplus_get_savers(), simage_gdiplus_identify(), and simage_gdiplus_open().
|
static |
Definition at line 487 of file simage_gdiplus.cpp.
Referenced by simage_gdiplus_save().
|
static |
Definition at line 82 of file simage_gdiplus.cpp.
Referenced by simage_gdiplus_load().
void simage_gdiplus_close | ( | void * | opendata | ) |
Definition at line 665 of file simage_gdiplus.cpp.
Referenced by add_internal_loaders().
int simage_gdiplus_error | ( | char * | buffer, |
int | buflen | ||
) |
Definition at line 300 of file simage_gdiplus.cpp.
References ERR_INIT, ERR_MEM, ERR_NOT_IMPLEMENTED, ERR_OPEN, ERR_OPEN_WRITE, ERR_READ, ERR_WRITE, and gdipluserror.
Referenced by add_internal_loaders(), and add_internal_savers().
char* simage_gdiplus_get_savers | ( | void | ) |
Definition at line 430 of file simage_gdiplus.cpp.
References ERR_INIT, ERR_NO_ERROR, gdiplus_init(), and gdipluserror.
Referenced by add_internal_savers().
int simage_gdiplus_identify | ( | const char * | ptr, |
const unsigned char * | header, | ||
int | headerlen | ||
) |
Definition at line 332 of file simage_gdiplus.cpp.
References ERR_INIT, ERR_NO_ERROR, simage_stream_s::filename, gdiplus_init(), and gdipluserror.
Referenced by add_internal_loaders().
unsigned char* simage_gdiplus_load | ( | const char * | filename, |
int * | width, | ||
int * | height, | ||
int * | numcomponents | ||
) |
Definition at line 357 of file simage_gdiplus.cpp.
References copy16bppGrayScaleBuffer(), copy32bppGrayScaleBuffer(), copyImageBuffer(), ERR_MEM, ERR_OPEN, gdipluserror, getReadFormat(), LOCKBITS_RECT_CAST, and simage_gdiplus_open().
Referenced by add_internal_loaders().
void* simage_gdiplus_open | ( | const char * | filename, |
int * | width, | ||
int * | height, | ||
int * | numcomponents | ||
) |
Definition at line 620 of file simage_gdiplus.cpp.
References ERR_INIT, ERR_NO_ERROR, ERR_OPEN, gdiplus_init(), and gdipluserror.
Referenced by add_internal_loaders(), and simage_gdiplus_load().
int simage_gdiplus_read_line | ( | void * | opendata, |
int | y, | ||
unsigned char * | buf | ||
) |
Definition at line 672 of file simage_gdiplus.cpp.
References ERR_READ, gdipluserror, and LOCKBITS_RECT_CAST.
Referenced by add_internal_loaders().
int simage_gdiplus_read_region | ( | void * | opendata, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
unsigned char * | buf | ||
) |
Definition at line 737 of file simage_gdiplus.cpp.
References ERR_READ, gdipluserror, and LOCKBITS_RECT_CAST.
int simage_gdiplus_save | ( | const char * | filename, |
const unsigned char * | bytes, | ||
int | width, | ||
int | height, | ||
int | numcomponents, | ||
const char * | filetypeext | ||
) |
Definition at line 522 of file simage_gdiplus.cpp.
References ERR_WRITE, gdipluserror, GetEncoderClsid(), and LOCKBITS_RECT_CAST.
Referenced by add_internal_savers().
|
static |
Definition at line 66 of file simage_gdiplus.cpp.
Referenced by simage_gdiplus_error(), simage_gdiplus_get_savers(), simage_gdiplus_identify(), simage_gdiplus_load(), simage_gdiplus_open(), simage_gdiplus_read_line(), simage_gdiplus_read_region(), and simage_gdiplus_save().