JunkBox_Lib 1.10.1
|
PNG TOOL HEADER. More...
Go to the source code of this file.
Data Structures | |
struct | PNGImage |
Macros | |
#define | PNG_SIGNATURE_SIZE 8 |
Functions | |
PNGImage | read_png_file (const char *fname) |
int | write_png_file (const char *fname, PNGImage *png) |
WSGraph | PNGImage2WSGraph (PNGImage png) |
BSGraph | PNGImage2BSGraph (PNGImage png) |
PNGImage | WSGraph2PNGImage (WSGraph vp) |
PNGImage | BSGraph2PNGImage (BSGraph vp) |
void | free_PNGImage (PNGImage *png) |
#define PNG_SIGNATURE_SIZE 8 |
Definition at line 34 of file png_tool.h.
Referenced by read_png_file().
PNGImage BSGraph2PNGImage(BSGraph vp)
Definition at line 278 of file png_tool.c.
References PNGImage::col, BSGraph::gp, PNGImage::gp, JBXL_GRAPH_IVDCOLOR_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, PNGImage::state, PNGImage::type, BSGraph::xs, PNGImage::xs, BSGraph::ys, PNGImage::ys, and BSGraph::zs.
void free_PNGImage | ( | PNGImage * | png | ) |
void free_PNGImage(PNGImage* png)
Definition at line 325 of file png_tool.c.
References PNGImage::gp.
BSGraph PNGImage2BSGraph(PNGImage png)
PNGデータをチャンネル分解して,BSGraphに格納する.
Definition at line 208 of file png_tool.c.
References PNGImage::col, BSGraph::gp, PNGImage::gp, JBXL_NORMAL, make_BSGraph(), BSGraph::state, PNGImage::xs, and PNGImage::ys.
WSGraph PNGImage2WSGraph(PNGImage png)
PNGデータをチャンネル分解して,WSGraphに格納する.
Definition at line 181 of file png_tool.c.
References PNGImage::col, WSGraph::gp, PNGImage::gp, JBXL_NORMAL, make_WSGraph(), WSGraph::state, PNGImage::xs, and PNGImage::ys.
PNGImage read_png_file | ( | const char * | fname | ) |
PNGImage read_png_file(const char* fname)
PNGファイルを読み込んで,PNGImage構造体へデータを格納する.
fname | 読み込むファイル名 |
JBXL_NORMAL | state: 正常終了 |
JBXL_ERROR | state: 初期化エラー |
JBXL_GRAPH_OPFILE_ERROR | state: ファイルオープンエラー |
JBXL_GRAPH_HEADER_ERROR | state: 不正ファイル(PNGファイルでない?) |
JBXL_GRAPH_IVDCOLOR_ERROR | state: サポート外のチャンネル(カラー)数 |
JBXL_GRAPH_MEMORY_ERROR | state: メモリエラー |
Definition at line 33 of file png_tool.c.
References PNGImage::col, PNGImage::gp, JBXL_ERROR, JBXL_GRAPH_HEADER_ERROR, JBXL_GRAPH_IVDCOLOR_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_GRAPH_OPFILE_ERROR, JBXL_NORMAL, len, PNG_SIGNATURE_SIZE, PNGImage::state, PNGImage::type, PNGImage::xs, and PNGImage::ys.
int write_png_file | ( | const char * | fname, |
PNGImage * | png ) |
int write_png_file(const char* fname, PNGImage* png)
png の画像データを fnameに書き出す.
fname | ファイル名 |
png | 保存する PNGデータへのポインタ |
0 | 正常終了 |
JBXL_GRAPH_OPFILE_ERROR | ファイルオープンエラー |
JBXL_GRAPH_HEADER_ERROR | 不正ファイル(PNGファイルでない?) |
JBXL_GRAPH_MEMORY_ERROR | メモリエラー |
JBXL_GRAPH_NODATA_ERROR | png にデータが無い |
JBXL_GRAPH_IVDARG_ERROR | ファイル名が NULL |
JBXL_GRAPH_IVDCOLOR_ERROR | サポート外のチャンネル(カラー)数 |
Definition at line 120 of file png_tool.c.
References PNGImage::col, PNGImage::gp, JBXL_ERROR, JBXL_GRAPH_IVDARG_ERROR, JBXL_GRAPH_IVDCOLOR_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_GRAPH_NODATA_ERROR, JBXL_GRAPH_OPFILE_ERROR, JBXL_NORMAL, len, PNGImage::state, PNGImage::type, PNGImage::xs, and PNGImage::ys.
PNGImage WSGraph2PNGImage(WSGraph vp)
Definition at line 232 of file png_tool.c.
References PNGImage::col, WSGraph::gp, PNGImage::gp, JBXL_GRAPH_IVDCOLOR_ERROR, JBXL_GRAPH_MEMORY_ERROR, JBXL_NORMAL, PNGImage::state, PNGImage::type, WSGraph::xs, PNGImage::xs, WSGraph::ys, PNGImage::ys, and WSGraph::zs.