Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Functions
pnm2png.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <zlib.h>
#include "png.h"

Go to the source code of this file.

Macros

#define BOOL   unsigned char
 
#define TRUE   (BOOL) 1
 
#define FALSE   (BOOL) 0
 
#define STDIN   0
 
#define STDOUT   1
 
#define STDERR   2
 
#define PNG_DEBUG   0
 
#define png_jmpbuf(png_ptr)   ((png_ptr)->jmpbuf)
 

Functions

int main (int argc, char *argv[])
 
void usage ()
 
BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha)
 
void get_token (FILE *pnm_file, char *token)
 
png_uint_32 get_data (FILE *pnm_file, int depth)
 
png_uint_32 get_value (FILE *pnm_file, int depth)
 

Macro Definition Documentation

◆ BOOL

#define BOOL   unsigned char

Definition at line 25 of file pnm2png.c.

Referenced by main().

◆ FALSE

#define FALSE   (BOOL) 0

Definition at line 31 of file pnm2png.c.

Referenced by main().

◆ PNG_DEBUG

#define PNG_DEBUG   0

Definition at line 40 of file pnm2png.c.

◆ png_jmpbuf

#define png_jmpbuf (   png_ptr)    ((png_ptr)->jmpbuf)

Definition at line 47 of file pnm2png.c.

◆ STDERR

#define STDERR   2

Definition at line 36 of file pnm2png.c.

◆ STDIN

#define STDIN   0

Definition at line 34 of file pnm2png.c.

Referenced by main().

◆ STDOUT

#define STDOUT   1

Definition at line 35 of file pnm2png.c.

Referenced by main().

◆ TRUE

#define TRUE   (BOOL) 1

Definition at line 28 of file pnm2png.c.

Referenced by main().

Function Documentation

◆ get_data()

png_uint_32 get_data ( FILE *  pnm_file,
int  depth 
)

Definition at line 557 of file pnm2png.c.

References bits_left, and i.

◆ get_token()

void get_token ( FILE *  pnm_file,
char *  token 
)

Definition at line 514 of file pnm2png.c.

References EOF, and i.

Referenced by get_value().

◆ get_value()

png_uint_32 get_value ( FILE *  pnm_file,
int  depth 
)

Definition at line 590 of file pnm2png.c.

References get_token(), and i.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 64 of file pnm2png.c.

References BOOL, FALSE, NULL, pnm2png(), STDIN, STDOUT, TRUE, and usage().

◆ pnm2png()

BOOL pnm2png ( FILE *  pnm_file,
FILE *  png_file,
FILE *  alpha_file,
BOOL  interlace,
BOOL  alpha 
)

Definition at line 190 of file pnm2png.c.

Referenced by main().

◆ usage()

void usage ( void  )

Definition at line 168 of file pnm2png.c.

Referenced by main().