summaryrefslogtreecommitdiff
path: root/doc/gutenprint/html/structstp__image.html
blob: e257bbca549bdb52fa62a3baa4d38f014f6534e6 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libgutenprint API Reference: stp_image Struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<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#ce69bf25344a814cabea38afa4527086">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="#ce69bf25344a814cabea38afa4527086"></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#7bb2244368c6b1e07d27afb3dd249ffd">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="#7bb2244368c6b1e07d27afb3dd249ffd"></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#890033525988e15f4f4a0b4132e5f19b">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="#890033525988e15f4f4a0b4132e5f19b"></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#4977ad211581999a3f3290983929cce9">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="#4977ad211581999a3f3290983929cce9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__image.html#g58672e1989d582c14328048b207657c8">stp_image_status_t</a>(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstp__image.html#8f7f8fb5826f52b8bd820f422c583350">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="#8f7f8fb5826f52b8bd820f422c583350"></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#56636ad7c0dbf0a82284241f796d95cd">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="#56636ad7c0dbf0a82284241f796d95cd"></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#5d2385711b303e055258c28f42ab7f4c">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="#5d2385711b303e055258c28f42ab7f4c"></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#b18e6ee35037589bf485213022e2d871">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="#b18e6ee35037589bf485213022e2d871"></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. <hr><h2>Field Documentation</h2>
<a class="anchor" name="ce69bf25344a814cabea38afa4527086"></a><!-- doxytag: member="stp_image::init" ref="ce69bf25344a814cabea38afa4527086" args=")(struct stp_image *image)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structstp__image.html#ce69bf25344a814cabea38afa4527086">stp_image::init</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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>

</div>
</div><p>
<a class="anchor" name="7bb2244368c6b1e07d27afb3dd249ffd"></a><!-- doxytag: member="stp_image::reset" ref="7bb2244368c6b1e07d27afb3dd249ffd" args=")(struct stp_image *image)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structstp__image.html#7bb2244368c6b1e07d27afb3dd249ffd">stp_image::reset</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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 class="warning" compact><dt><b>Warning:</b></dt><dd>The <a class="el" href="structstp__image.html#7bb2244368c6b1e07d27afb3dd249ffd" title="This callback is called to reset the image to the beginning.">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>

</div>
</div><p>
<a class="anchor" name="890033525988e15f4f4a0b4132e5f19b"></a><!-- doxytag: member="stp_image::width" ref="890033525988e15f4f4a0b4132e5f19b" args=")(struct stp_image *image)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="structstp__image.html#890033525988e15f4f4a0b4132e5f19b">stp_image::width</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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>

</div>
</div><p>
<a class="anchor" name="4977ad211581999a3f3290983929cce9"></a><!-- doxytag: member="stp_image::height" ref="4977ad211581999a3f3290983929cce9" args=")(struct stp_image *image)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* <a class="el" href="structstp__image.html#4977ad211581999a3f3290983929cce9">stp_image::height</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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>

</div>
</div><p>
<a class="anchor" name="8f7f8fb5826f52b8bd820f422c583350"></a><!-- doxytag: member="stp_image::get_row" ref="8f7f8fb5826f52b8bd820f422c583350" args=")(struct stp_image *image, unsigned char *data, size_t byte_limit, int row)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__image.html#g58672e1989d582c14328048b207657c8">stp_image_status_t</a>(* <a class="el" href="structstp__image.html#8f7f8fb5826f52b8bd820f422c583350">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>
</div>
<div class="memdoc">

<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#890033525988e15f4f4a0b4132e5f19b" title="This callback returns the width of the image in pixels.">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#890033525988e15f4f4a0b4132e5f19b" title="This callback returns the width of the image in pixels.">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>

</div>
</div><p>
<a class="anchor" name="56636ad7c0dbf0a82284241f796d95cd"></a><!-- doxytag: member="stp_image::get_appname" ref="56636ad7c0dbf0a82284241f796d95cd" args=")(struct stp_image *image)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char*(* <a class="el" href="structstp__image.html#56636ad7c0dbf0a82284241f796d95cd">stp_image::get_appname</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This callback returns the name of the application. 
<p>
This is embedded in the output by some drivers. 
</div>
</div><p>
<a class="anchor" name="5d2385711b303e055258c28f42ab7f4c"></a><!-- doxytag: member="stp_image::conclude" ref="5d2385711b303e055258c28f42ab7f4c" args=")(struct stp_image *image)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structstp__image.html#5d2385711b303e055258c28f42ab7f4c">stp_image::conclude</a>)(struct <a class="el" href="structstp__image.html">stp_image</a> *image)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This callback is called at the end of each page. 
<p>

</div>
</div><p>
<a class="anchor" name="b18e6ee35037589bf485213022e2d871"></a><!-- doxytag: member="stp_image::rep" ref="b18e6ee35037589bf485213022e2d871" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* <a class="el" href="structstp__image.html#b18e6ee35037589bf485213022e2d871">stp_image::rep</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
A pointer to an application-specific state information that might need to be associated with the image object. 
<p>

</div>
</div><p>
<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>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Nov 14 07:50:24 2008 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.5.5 </small></address>
</body>
</html>