Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://coin3d.github.io
https://www.kongsberg.com/en/kogt/
simage_gdiplus.h
Go to the documentation of this file.
1 #ifndef _SIMAGE_GDIPLUS_H_
2 #define _SIMAGE_GDIPLUS_H_
3 
4 /*
5  * Copyright (c) Kongsberg Oil & Gas Technologies
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifdef HAVE_CONFIG_H
21 #include <config.h>
22 #endif /* HAVE_CONFIG_H */
23 
24 #ifndef SIMAGE_GDIPLUS_SUPPORT
25 #error "This file should not be used under the current configuration!"
26 #endif /* !SIMAGE_GDIPLUS_SUPPORT */
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32  int simage_gdiplus_error(char * textbuffer, int buffersize);
33 
34  int simage_gdiplus_identify(const char * filename,
35  const unsigned char * header,
36  int headerlen);
37 
38  unsigned char * simage_gdiplus_load(const char * filename,
39  int * width,
40  int * height,
41  int * numcomponents);
42 
43  char * simage_gdiplus_get_savers(void); /* extra function needed to create saver info */
44  int simage_gdiplus_save(const char * filename,
45  const unsigned char * bytes,
46  int width,
47  int height,
48  int numcomponents,
49  const char * ext);
50 
51 /* new for simage 1.6 */
52  void * simage_gdiplus_open(const char * filename,
53  int * width,
54  int * height,
55  int * numcomponents);
56  void simage_gdiplus_close(void * opendata);
57  int simage_gdiplus_read_line(void * opendata, int y, unsigned char * buf);
58 
59 /*
60  * FIXME: unstable experimental region support API. Use it without
61  * knowing why and a fiercely looking fluffy cow will cross your way
62  * one day. The fluffy cow is gonna eat up all your code and will
63  * happily moo the doomsday symphony while blocking your getaway
64  * road. YA HAVE BEEN WARNED! 20060520 tamer.
65  */
66  int simage_gdiplus_read_region(void * opendata,
67  int x, int y, int w, int h,
68  unsigned char * buf);
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* _SIMAGE_GDIPLUS_H_ */
char * filename
Definition: stream.c:38
int simage_gdiplus_identify(const char *filename, const unsigned char *header, int headerlen)
Definition: simage_gdiplus.cpp:332
unsigned char * simage_gdiplus_load(const char *filename, int *width, int *height, int *numcomponents)
Definition: simage_gdiplus.cpp:357
char * simage_gdiplus_get_savers(void)
Definition: simage_gdiplus.cpp:430
void * simage_gdiplus_open(const char *filename, int *width, int *height, int *numcomponents)
Definition: simage_gdiplus.cpp:620
void simage_gdiplus_close(void *opendata)
Definition: simage_gdiplus.cpp:665
int simage_gdiplus_read_region(void *opendata, int x, int y, int w, int h, unsigned char *buf)
Definition: simage_gdiplus.cpp:737
int simage_gdiplus_read_line(void *opendata, int y, unsigned char *buf)
Definition: simage_gdiplus.cpp:672
int simage_gdiplus_save(const char *filename, const unsigned char *bytes, int width, int height, int numcomponents, const char *ext)
Definition: simage_gdiplus.cpp:522
int simage_gdiplus_error(char *textbuffer, int buffersize)
Definition: simage_gdiplus.cpp:300