summaryrefslogtreecommitdiff
path: root/www/api/export.html
blob: d54bc6ded56c3b5202a228805685df72c1542731 (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
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>export</title>
<link rel="stylesheet" href="../docutils-api.css" type="text/css" />
</head>
<body>

<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
  <input type="hidden" name="domains" value="www.graphicsmagick.org" />
  <input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" />&nbsp;<input type="submit" name="sa" value="Search" /></span>
</form>
</div>

<div class="navmenu">
<ul>
  <li><a href="../index.html">Home</a></li>
  <li><a href="../project.html">Project</a></li>
  <li><a href="../download.html">Download</a></li>
  <li><a href="../README.html">Install</a></li>
  <li><a href="../Hg.html">Source</a></li>
  <li><a href="../NEWS.html">News</a> </li>
  <li><a href="../utilities.html">Utilities</a></li>
  <li><a href="../programming.html">Programming</a></li>
  <li><a href="../reference.html">Reference</a></li>
</ul>
</div>
<div class="document" id="export">
<h1 class="title">export</h1>
<h2 class="subtitle" id="export-image-pixels-into-common-representations">Export image pixels into common representations</h2>

<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#exportimagepixelarea" id="id5">ExportImagePixelArea</a></li>
<li><a class="reference internal" href="#exportviewpixelarea" id="id6">ExportViewPixelArea</a></li>
<li><a class="reference internal" href="#exportpixelareaoptionsinit" id="id7">ExportPixelAreaOptionsInit</a></li>
</ul>
</div>
<div class="section" id="exportimagepixelarea">
<h1><a class="toc-backref" href="#id5">ExportImagePixelArea</a></h1>
<div class="section" id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">
MagickPassFail ExportImagePixelArea( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#quantumtype">QuantumType</a> quantum_type,
                                     unsigned int quantum_size, unsigned char *destination,
                                     const ExportPixelAreaOptions *options,
                                     ExportPixelAreaInfo *export_info );
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>ExportImagePixelArea() transfers one or more pixel components from the
default image pixel cache view to a user supplied buffer.  By default,
values are written in network (big-endian) byte/bit order.  By setting
the 'endian' member of ExportPixelAreaOptions, 16, 32 and 64-bit values
may be output as little (LSBEndian), big (MSBEndian), or host native
(NativeEndian) endian values.  This function is quite powerful in that
besides common native CPU type sizes, it can support any integer bit
depth from 1 to 32 (e.g. 13), 64-bits as well as 32 and 64-bit float.</p>
<p>MagickPass is returned if the pixels are successfully transferred,
otherwise MagickFail.</p>
<p>The format of the ExportImagePixelArea method is:</p>
<pre class="literal-block">
MagickPassFail ExportImagePixelArea( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#quantumtype">QuantumType</a> quantum_type,
                                     unsigned int quantum_size, unsigned char *destination,
                                     const ExportPixelAreaOptions *options,
                                     ExportPixelAreaInfo *export_info );
</pre>
<dl class="docutils">
<dt>status:</dt>
<dd>Returns MagickPass if the pixels are successfully transferred,
otherwise MagickFail.</dd>
<dt>image:</dt>
<dd>The image.</dd>
<dt>quantum_type:</dt>
<dd>Declare which pixel components to transfer (AlphaQuantum,
BlackQuantum, BlueQuantum, CMYKAQuantum, CMYKQuantum, CyanQuantum,
GrayAlphaQuantum, GrayQuantum, GreenQuantum, IndexAlphaQuantum,
IndexQuantum, MagentaQuantum, RGBAQuantum, RGBQuantum,
RedQuantum, YellowQuantum)</dd>
<dt>quantum_size:</dt>
<dd>Bits per quantum sample (range 1-32, and 64).</dd>
<dt>destination:</dt>
<dd>The components are transferred to this buffer.  The user
is responsible for ensuring that the destination buffer is large
enough.</dd>
<dt>options:</dt>
<dd>Additional options specific to quantum_type (may be NULL).</dd>
<dt>export_info :</dt>
<dd>Populated with information regarding the pixels
exported (may be NULL)</dd>
</dl>
</div>
</div>
<div class="section" id="exportviewpixelarea">
<h1><a class="toc-backref" href="#id6">ExportViewPixelArea</a></h1>
<div class="section" id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">
MagickPassFail ExportViewPixelArea( const <a class="reference external" href="../api/types.html#viewinfo">ViewInfo</a> *view, const <a class="reference external" href="../api/types.html#quantumtype">QuantumType</a> quantum_type,
                                    unsigned int quantum_size, unsigned char *destination,
                                    const ExportPixelAreaOptions *options,
                                    ExportPixelAreaInfo *export_info );
</pre>
</div>
<div class="section" id="id2">
<h2>Description</h2>
<p>ExportViewPixelArea() transfers one or more pixel components from the
specified image pixel cache view to a user supplied buffer.  By default,
values are written in network (big-endian) byte/bit order.  By setting the
'endian' member of ExportPixelAreaOptions, 16, 32 and 64-bit values may be
output as little (LSBEndian), big (MSBEndian), or host native
(NativeEndian) endian values.  This function is quite powerful in that
besides common native CPU type sizes, it can support any integer bit depth
from 1 to 32 (e.g. 13), 64-bits as well as 32 and 64-bit float.</p>
<p>MagickPass is returned if the pixels are successfully transferred,
otherwise MagickFail.</p>
<p>The format of the ExportViewPixelArea method is:</p>
<pre class="literal-block">
MagickPassFail ExportViewPixelArea( const <a class="reference external" href="../api/types.html#viewinfo">ViewInfo</a> *view, const <a class="reference external" href="../api/types.html#quantumtype">QuantumType</a> quantum_type,
                                    unsigned int quantum_size, unsigned char *destination,
                                    const ExportPixelAreaOptions *options,
                                    ExportPixelAreaInfo *export_info );
</pre>
<dl class="docutils">
<dt>status:</dt>
<dd>Returns MagickPass if the pixels are successfully transferred,
otherwise MagickFail.</dd>
<dt>view:</dt>
<dd>The image pixel cache view.</dd>
<dt>quantum_type:</dt>
<dd>Declare which pixel components to transfer (AlphaQuantum,
BlackQuantum, BlueQuantum, CMYKAQuantum, CMYKQuantum, CyanQuantum,
GrayAlphaQuantum, GrayQuantum, GreenQuantum, IndexAlphaQuantum,
IndexQuantum, MagentaQuantum, RGBAQuantum, RGBQuantum,
RedQuantum, YellowQuantum)</dd>
<dt>quantum_size:</dt>
<dd>Bits per quantum sample (range 1-32, and 64).</dd>
<dt>destination:</dt>
<dd>The components are transferred to this buffer.  The user
is responsible for ensuring that the destination buffer is large
enough.</dd>
<dt>options:</dt>
<dd>Additional options specific to quantum_type (may be NULL).</dd>
<dt>export_info :</dt>
<dd>Populated with information regarding the pixels
exported (may be NULL)</dd>
</dl>
</div>
</div>
<div class="section" id="exportpixelareaoptionsinit">
<h1><a class="toc-backref" href="#id7">ExportPixelAreaOptionsInit</a></h1>
<div class="section" id="id3">
<h2>Synopsis</h2>
<pre class="literal-block">
void ExportPixelAreaOptionsInit( ExportPixelAreaOptions *options );
</pre>
</div>
<div class="section" id="id4">
<h2>Description</h2>
<p>ExportPixelAreaOptionsInit() initializes the options structure which is
optionally passed to ExportPixelArea()</p>
<p>The format of the ExportPixelAreaOptionsInit method is:</p>
<pre class="literal-block">
void ExportPixelAreaOptionsInit( ExportPixelAreaOptions *options );
</pre>
<p>A description of each parameter follows:</p>
<dl class="docutils">
<dt>options:</dt>
<dd>Options structure to initialize.</dd>
</dl>
</div>
</div>
</div>

<hr class="docutils">
<div class="document">
    <p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002 - 2022<!--SPONSOR_LOGO--></p>
</div>
</body>
</html>