GPS4Palm

Source Code Documentation


pngdec.c File Reference

#include <PalmOS.h>
#include <Unix/sys_types.h>
#include "stringil.h"
#include "common.h"
#include "pngdec.h"
#include "SysZLib.h"
#include "file_io.h"
#include "Utils.h"
#include "progressbar.h"

Include dependency graph for pngdec.c:

Go to the source code of this file.

Defines

#define QUIET
#define SH(p)   ((ush)(uch)((p)[1]) | ((ush)(uch)((p)[0]) << 8))
#define LG(p)   ((ulg)(SH((p)+2)) | ((ulg)(SH(p)) << 16))
#define BS   1440
#define OBS   (3*BS)

Typedefs

typedef unsigned char uch
typedef unsigned short ush
typedef unsigned long ulg

Functions

void cleanPNG (void)
int doPNG (FileDescrType fd)

Variables

PrefsType gPrefs
 Preferences data structure.
unsigned char buffer [BS]
Boolean color
 passed to PNG (maybe others) to generate greyscale or colors
unsigned short int w
unsigned short int h
unsigned short int bitdisp
unsigned short int bdepth
unsigned short int ityp
unsigned short int lace
unsigned short int nplte = 0
unsigned short int gskip
unsigned short int bskip
unsigned short int bandh
int trspflg = 0
LocalID lid
DmOpenRef scratch
char ** lines
char * lcur
char * editln
unsigned char cmap [256]
unsigned char r [256]
unsigned char g [256]
unsigned char b [256]
unsigned char a [256]
unsigned int mapmax = 0
RGBColorType map [256]
char * pngty []


Define Documentation

#define BS   1440
 

Definition at line 78 of file pngdec.c.

#define LG  )     ((ulg)(SH((p)+2)) | ((ulg)(SH(p)) << 16))
 

Definition at line 76 of file pngdec.c.

#define OBS   (3*BS)
 

Definition at line 79 of file pngdec.c.

#define QUIET
 

Definition at line 67 of file pngdec.c.

#define SH  )     ((ush)(uch)((p)[1]) | ((ush)(uch)((p)[0]) << 8))
 

Definition at line 75 of file pngdec.c.


Typedef Documentation

typedef unsigned char uch
 

Definition at line 72 of file pngdec.c.

typedef unsigned long ulg
 

Definition at line 74 of file pngdec.c.

typedef unsigned short ush
 

Definition at line 73 of file pngdec.c.


Function Documentation

void cleanPNG void   ) 
 

Definition at line 667 of file pngdec.c.

References bandh, lines, and scratch.

Referenced by doPNG(), and MapFormHandleEvent().

int doPNG FileDescrType  fd  ) 
 

Definition at line 697 of file pngdec.c.

References buffer, cleanPNG(), cmap, editln, fclose(), fread(), ityp, lines, memcmp(), scratch, strcmp(), ZLSetup, and ZLTeardown.

Referenced by MapFormHandleEvent().


Variable Documentation

unsigned char a[256]
 

Definition at line 109 of file pngdec.c.

Referenced by calcR().

unsigned char b[256]
 

Definition at line 109 of file pngdec.c.

Referenced by BmpRsrcSetTransparentValue(), and dobitmap().

unsigned short int bandh
 

Definition at line 86 of file pngdec.c.

unsigned short int bdepth
 

Definition at line 86 of file pngdec.c.

unsigned short int bitdisp
 

Definition at line 86 of file pngdec.c.

unsigned short int bskip
 

Definition at line 86 of file pngdec.c.

unsigned char buffer[BS]
 

Definition at line 80 of file pngdec.c.

Referenced by doPNG().

unsigned char cmap[256]
 

Definition at line 109 of file pngdec.c.

Referenced by doGIF(), and doPNG().

Boolean color
 

passed to PNG (maybe others) to generate greyscale or colors

Definition at line 98 of file gifread.c.

char * editln
 

Definition at line 107 of file pngdec.c.

unsigned char g[256]
 

Definition at line 109 of file pngdec.c.

Referenced by BmpRsrcSetTransparentValue(), and dobitmap().

PrefsType gPrefs
 

Preferences data structure.

Definition at line 279 of file GPS.c.

unsigned short int gskip
 

Initial value:

  1

Definition at line 86 of file pngdec.c.

unsigned short int h
 

Definition at line 85 of file pngdec.c.

unsigned short int ityp
 

Definition at line 86 of file pngdec.c.

Referenced by doPNG().

unsigned short int lace
 

Definition at line 86 of file pngdec.c.

Referenced by doGIF().

char * lcur
 

Definition at line 107 of file pngdec.c.

LocalID lid
 

Definition at line 104 of file pngdec.c.

Referenced by CreateDatabase(), doGIF(), and getdir().

char** lines
 

Definition at line 107 of file pngdec.c.

Referenced by cleanGIF(), cleanPNG(), dobitmap(), doGIF(), and doPNG().

RGBColorType map[256]
 

Definition at line 111 of file pngdec.c.

unsigned int mapmax = 0
 

Definition at line 110 of file pngdec.c.

unsigned short int nplte = 0
 

Definition at line 86 of file pngdec.c.

char* pngty[]
 

Initial value:

  { "Gray", "Unk1", "RGB ", "CMAP", "GryA", "Unk5", "RGBA", "Unk7" }

Definition at line 440 of file pngdec.c.

unsigned char r[256]
 

Definition at line 109 of file pngdec.c.

Referenced by BmpRsrcSetTransparentValue(), calcR(), dobitmap(), MapFormHandleEvent(), and noMap().

DmOpenRef scratch
 

Definition at line 105 of file pngdec.c.

int trspflg = 0
 

Definition at line 91 of file pngdec.c.

unsigned short int w
 

Definition at line 85 of file pngdec.c.


Created: Mon, 08 Oct 2007 22:33:16 +0200
Copyright ©2004 M. Prinke