38 static void write_word(
unsigned char *dest,
unsigned short value) {
73 fwrite(&img,
sizeof(img), 1, oFile);
95 int i, bwide, wwide, vcount;
98 short *zeile1, *zeile2;
100 bwide = (pp->
breite + 7) >> 3;
101 wwide = (pp->
breite + 15) >> 4;
105 while (zl < pp->hoehe) {
106 zeile1 = pp->
inh + (long)zl * (
long)wwide;
107 if(zl != pp->
hoehe - 1) {
112 zeile2 = pp->
inh + (long)(zl + 1) * (long)wwide;
113 if(memcmp(zeile1, zeile2, bwide))
123 if(zl == pp->
hoehe - 1) {
163 else if(*cp == (
char)255) {
171 if(*cp != (
char)255) {
200 if(*cp ==
'\0' && *(cp + 1) ==
'\0' && *(cp + 2) ==
'\0') {
204 if(*cp==(
char)255 && *(cp+1)==(
char)255 && *(cp+2)==(
char)255) {
unsigned char planes[2]
1 for monochrome and 4 for 16-col files
void write_img_header(FILE *oFile, unsigned int xdim, unsigned int ydim)
Creates and writes the image header.
static void write_word(unsigned char *dest, unsigned short value)
Writes a number as a char ...
unsigned char pattlen[2]
length in bytes of a pattern
Internal struct to store basic informations for the image header.
unsigned char lines[2]
Image height - lines per image.
short * inh
pointer to bitmap
unsigned char version[2]
Is normally 1.
unsigned char width[2]
Width of a pixel in tenths of a millimetre.
short breite
width in pixels (16 pixel steps!)
Internal struct to store informations for images.
unsigned char length[2]
Header size.
unsigned char height[2]
Height of a pixel in tenths of a millimetre.
void write_img(pictogram_t *pp, FILE *fp)
unsigned char pixels[2]
Image width - pixles per line.
short hoehe
height in pixels