JunkBox_Lib  1.10.2
png_tool.h
Go to the documentation of this file.
1 #ifndef __JBXL_PNG_TOOL_H_
2 #define __JBXL_PNG_TOOL_H_
3 
4 #include "xtools.h"
5 
6 #ifndef HAVE_PNG_H
7 #ifndef DISABLE_PNG
8 #define DISABLE_PNG
9 #endif
10 #endif
11 
12 #ifdef DISABLE_PNG
13 #undef ENABLE_PNG
14 #endif
15 
16 
17 #ifdef ENABLE_PNG
18 
30 #include "gdata.h"
31 #include <png.h>
32 
33 #ifndef PNG_SIGNATURE_SIZE
34 #define PNG_SIGNATURE_SIZE 8
35 #endif
36 
37 
38 typedef struct
39 {
40  int xs;
41  int ys;
42  int col;
43  int state;
46  //
47 } PNGImage;
48 
49 
50 
52 
53 PNGImage read_png_file (const char* fname);
54 int write_png_file(const char* fname, PNGImage* png);
55 
60 
61 void free_PNGImage(PNGImage* png);
62 
63 
64 #endif // DISABLE_PNG
65 #endif // __JBXL_PNG_TOOL_H_
66 
unsigned char uByte
1Byte
Definition: common.h:332
グラフィックデータ定義用ヘッダ
PNGImage WSGraph2PNGImage(WSGraph vp)
Definition: png_tool.c:232
BSGraph PNGImage2BSGraph(PNGImage png)
Definition: png_tool.c:208
PNGImage read_png_file(const char *fname)
Definition: png_tool.c:33
PNGImage BSGraph2PNGImage(BSGraph vp)
Definition: png_tool.c:278
void free_PNGImage(PNGImage *png)
Definition: png_tool.c:325
int write_png_file(const char *fname, PNGImage *png)
Definition: png_tool.c:120
WSGraph PNGImage2WSGraph(PNGImage png)
Definition: png_tool.c:181
Definition: gdata.h:27
uByte type
Definition: png_tool.h:44
int xs
Definition: png_tool.h:40
int state
Definition: png_tool.h:43
uByte * gp
Definition: png_tool.h:45
int ys
Definition: png_tool.h:41
int col
Definition: png_tool.h:42
Definition: gdata.h:42
汎用拡張ツールヘッダ