cab CUPS Treiber  ---
image.h
Go to the documentation of this file.
1 /******************************************************************************
2  * cab Produkttechnik GmbH & Co KG
3  * Entwicklung Etikettendrucker
4  *
5  * cab CUPS Linux Driver, image.h
6  * - Functions for writing to a Image file
7  *
8  * Copyright (c) 2004-2020 cab Produkttechnik GmbH, Germany
9  *
10  * Licensed under Apache License v2.0. See the file "LICENSE" for more
11  * information.
12  *
13  */
14 
15 /*****************************************************************************/
16 
17 #ifndef IMAGE_H_
18 #define IMAGE_H_
19 
20 #include <stdio.h>
21 
22 
24 #define DPMM 12
25 
27 typedef struct {
28  unsigned char version[2];
29  unsigned char length[2];
30  unsigned char planes[2];
31  unsigned char pattlen[2];
32  unsigned char width[2];
33  unsigned char height[2];
34  unsigned char pixels[2];
35  unsigned char lines[2];
36 } imghead_t;
37 
39 typedef struct pictogram {
40  char name[8];
41  short breite;
42  short hoehe;
43  short *inh;
44 } pictogram_t;
45 
46 
47 /*****************************************************************************/
48 /*---------------------------------------------------------------------------*/
60 /*---------------------------------------------------------------------------*/
61 /* Note: */
62 /* */
63 /*---------------------------------------------------------------------------*/
64 void write_img_header (FILE *oFile, unsigned int xdim, unsigned int ydim);
65 
66 /*****************************************************************************/
67 /*---------------------------------------------------------------------------*/
78 /*---------------------------------------------------------------------------*/
79 /* Note: */
80 /* */
81 /*---------------------------------------------------------------------------*/
82 void write_img(pictogram_t *pp, FILE *fp);
83 
84 #endif /* IMAGE_H_ */
void write_img(pictogram_t *pp, FILE *fp)
Definition: image.c:94
char name[8]
Picturename.
Definition: image.h:40
void write_img_header(FILE *oFile, unsigned int xdim, unsigned int ydim)
Creates and writes the image header.
Definition: image.c:60
Internal struct to store basic informations for the image header.
Definition: image.h:27
struct pictogram pictogram_t
Internal struct to store informations for images.
short * inh
pointer to bitmap
Definition: image.h:43
short breite
width in pixels (16 pixel steps!)
Definition: image.h:41
Internal struct to store informations for images.
Definition: image.h:39
short hoehe
height in pixels
Definition: image.h:42