summaryrefslogtreecommitdiff
path: root/doc/gutenprint/html/structstp__image.html
blob: e5b4644599c03ad5afbc3ac9e87edef32e87167a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libgutenprint API Reference: stp_image Struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.3-20050530 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>stp_image Struct Reference<br>
<small>
[<a class="el" href="group__image.html">image</a>]</small>
</h1><!-- doxytag: class="stp_image" -->The image type is an abstract data type for interfacing with the image creation program.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;image.h&gt;</code>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstp__image.html#o0">init</a> )(struct <a class="el" href="structstp__image.html">stp_image</a> *image)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This callback is used to perform any initialization required by the image layer for the image.  <a href="#o0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstp__image.html#o1">reset</a> )(struct <a class="el" href="structstp__image.html">stp_image</a> *image)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This callback is called to reset the image to the beginning.  <a href="#o1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstp__image.html#o2">width</a> )(struct <a class="el" href="structstp__image.html">stp_image</a> *image)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This callback returns the width of the image in pixels.  <a href="#o2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstp__image.html#o3">height</a> )(struct <a class="el" href="structstp__image.html">stp_image</a> *image)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This callback returns the height of the image in pixels.  <a href="#o3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__image.html#ga9">stp_image_status_t</a>(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstp__image.html#o4">get_row</a> )(struct <a class="el" href="structstp__image.html">stp_image</a> *image, unsigned char *data, size_t byte_limit, int row)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This callback transfers the data from the image to the gimp-print library.  <a href="#o4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstp__image.html#o5">get_appname</a> )(struct <a class="el" href="structstp__image.html">stp_image</a> *image)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This callback returns the name of the application.  <a href="#o5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstp__image.html#o6">conclude</a> )(struct <a class="el" href="structstp__image.html">stp_image</a> *image)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This callback is called at the end of each page.  <a href="#o6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstp__image.html#o7">rep</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A pointer to an application-specific state information that might need to be associated with the image object.  <a href="#o7"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The image type is an abstract data type for interfacing with the image creation program. 
<p>
It provides callbacks to functions defined within the client application which are called while printing the image.
<p>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="o6"></a><!-- doxytag: member="stp_image::conclude" ref="o6" args=")(struct stp_image *image)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void(* <a class="el" href="structstp__image.html#o6">stp_image::conclude</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This callback is called at the end of each page. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="o5"></a><!-- doxytag: member="stp_image::get_appname" ref="o5" args=")(struct stp_image *image)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char*(* <a class="el" href="structstp__image.html#o5">stp_image::get_appname</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This callback returns the name of the application. 
<p>
This is embedded in the output by some drivers.    </td>
  </tr>
</table>
<a class="anchor" name="o4"></a><!-- doxytag: member="stp_image::get_row" ref="o4" args=")(struct stp_image *image, unsigned char *data, size_t byte_limit, int row)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__image.html#ga9">stp_image_status_t</a>(* <a class="el" href="structstp__image.html#o4">stp_image::get_row</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image, unsigned char *data, size_t byte_limit, int row)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This callback transfers the data from the image to the gimp-print library. 
<p>
It is called from the driver layer. It should copy WIDTH (as returned by the <a class="el" href="structstp__image.html#o2">width()</a> member) pixels of data into the data buffer. It normally returns STP_IMAGE_STATUS_OK; if something goes wrong, or the application wishes to stop producing any further output (e. g. because the user cancelled the print job), it should return STP_IMAGE_STATUS_ABORT. This will cause the driver to flush any remaining data to the output. It will always request rows in monotonically ascending order, but it may skip rows (if, for example, the resolution of the input is higher than the resolution of the output). <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>image</em>&nbsp;</td><td>the image in use. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>a pointer to <a class="el" href="structstp__image.html#o2">width()</a> bytes of pixel data. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>byte_limit</em>&nbsp;</td><td>(image width * number of channels). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>row</em>&nbsp;</td><td>(unused).</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="o3"></a><!-- doxytag: member="stp_image::height" ref="o3" args=")(struct stp_image *image)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int(* <a class="el" href="structstp__image.html#o3">stp_image::height</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This callback returns the height of the image in pixels. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>image</em>&nbsp;</td><td>the image in use.</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="o0"></a><!-- doxytag: member="stp_image::init" ref="o0" args=")(struct stp_image *image)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void(* <a class="el" href="structstp__image.html#o0">stp_image::init</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This callback is used to perform any initialization required by the image layer for the image. 
<p>
It will be called once per image. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>image</em>&nbsp;</td><td>the image in use.</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="o7"></a><!-- doxytag: member="stp_image::rep" ref="o7" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void* <a class="el" href="structstp__image.html#o7">stp_image::rep</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
A pointer to an application-specific state information that might need to be associated with the image object. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="o1"></a><!-- doxytag: member="stp_image::reset" ref="o1" args=")(struct stp_image *image)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void(* <a class="el" href="structstp__image.html#o1">stp_image::reset</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This callback is called to reset the image to the beginning. 
<p>
It may (in principle) be called multiple times if a page is being printed more than once. <dl compact><dt><b>Warning:</b></dt><dd>The <a class="el" href="structstp__image.html#o1">reset()</a> call may be removed in the future. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>image</em>&nbsp;</td><td>the image in use.</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="o2"></a><!-- doxytag: member="stp_image::width" ref="o2" args=")(struct stp_image *image)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int(* <a class="el" href="structstp__image.html#o2">stp_image::width</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This callback returns the width of the image in pixels. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>image</em>&nbsp;</td><td>the image in use.</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>include/gutenprint/<a class="el" href="image_8h.html">image.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Sat Jul 2 09:45:09 2005 for libgutenprint API Reference by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.3-20050530 </small></address>
</body>
</html>