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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="en" name="language">
<title>operator</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link media="screen" href="../docutils-api.css" type="text/css" rel="stylesheet">
</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" /> <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="operator">
<h1 class="title">operator</h1>
<p class="subtitle" id="methods-to-apply-mathematic-or-boolean-operators-to-pixels">Methods to apply mathematic or boolean operators to pixels.</p>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#quantumoperatorimage" id="id3">QuantumOperatorImage</a></p></li>
<li><p><a class="reference internal" href="#quantumoperatorregionimage" id="id4">QuantumOperatorRegionImage</a></p></li>
</ul>
</div>
<div class="section" id="quantumoperatorimage">
<h1><a class="toc-backref" href="#id3">QuantumOperatorImage</a></h1>
<div class="section" id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail QuantumOperatorImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#channeltype">ChannelType</a> channel,
QuantumOperator operator, double rvalue );</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>QuantumOperatorImage() performs the requested arithmetic,
bitwise-logical, or value operation on the selected channels of
the entire image. The AllChannels channel option operates on all
color channels whereas the GrayChannel channel option treats the
color channels as a grayscale intensity.</p>
<p>These operations are on the DirectClass pixels of the image and do not
update pixel indexes or colormap.</p>
<p>The format of the QuantumOperatorImage method is:</p>
<pre class="literal-block">MagickPassFail QuantumOperatorImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#channeltype">ChannelType</a> channel,
QuantumOperator operator, double rvalue );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>channel:</dt>
<dd><p>Channel to operate on (RedChannel, CyanChannel,
GreenChannel, MagentaChannel, BlueChannel, YellowChannel,
OpacityChannel, BlackChannel, MatteChannel, AllChannels,
GrayChannel). The AllChannels type only updates color
channels. The GrayChannel type treats the color channels
as if they represent an intensity.</p>
</dd>
<dt>quantum_operator:</dt>
<dd><p>Operator to use (AddQuantumOp, AndQuantumOp,
AssignQuantumOp, DepthQuantumOp, DivideQuantumOp, GammaQuantumOp,
LShiftQuantumOp, MultiplyQuantumOp, NegateQuantumOp,
NoiseGaussianQuantumOp, NoiseImpulseQuantumOp,
NoiseLaplacianQuantumOp, NoiseMultiplicativeQuantumOp,
NoisePoissonQuantumOp, NoiseRandomQuantumOp, NoiseUniformQuantumOp,
OrQuantumOp, RShiftQuantumOp, SubtractQuantumOp,
ThresholdBlackQuantumOp, ThresholdQuantumOp, ThresholdWhiteQuantumOp,
ThresholdBlackNegateQuantumOp, ThresholdWhiteNegateQuantumOp,
XorQuantumOp).</p>
</dd>
<dt>rvalue:</dt>
<dd><p>Operator argument.</p>
</dd>
<dt>exception:</dt>
<dd><p>Updated with error description.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="quantumoperatorregionimage">
<h1><a class="toc-backref" href="#id4">QuantumOperatorRegionImage</a></h1>
<div class="section" id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail QuantumOperatorRegionImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, long x, long y,
unsigned long columns, unsigned long rows,
<a class="reference external" href="../api/types.html#channeltype">ChannelType</a> channel,
QuantumOperator quantum_operator, double rvalue );</pre>
</div>
<div class="section" id="id2">
<h2>Description</h2>
<p>QuantumOperatorRegionImage() performs the requested arithmetic,
bitwise-logical, or value operation on the selected channels of
the image over the specified region. The AllChannels channel option
operates on all color channels whereas the GrayChannel channel option
treats the color channels as a grayscale intensity.</p>
<p>These operations are on the DirectClass pixels of the image and do not
update pixel indexes or colormap.</p>
<p>The format of the QuantumOperatorRegionImage method is:</p>
<pre class="literal-block">MagickPassFail QuantumOperatorRegionImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, long x, long y,
unsigned long columns, unsigned long rows,
<a class="reference external" href="../api/types.html#channeltype">ChannelType</a> channel,
QuantumOperator quantum_operator, double rvalue );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>channel:</dt>
<dd><p>Channel to operate on (RedChannel, CyanChannel,
GreenChannel, MagentaChannel, BlueChannel, YellowChannel,
OpacityChannel, BlackChannel, MatteChannel, AllChannels,
GrayChannel). The AllChannels type only updates color
channels. The GrayChannel type treats the color channels
as if they represent an intensity.</p>
</dd>
<dt>x:</dt>
<dd><p>Ordinate of left row of region.</p>
</dd>
<dt>y:</dt>
<dd><p>Orginate of top column of region.</p>
</dd>
<dt>columns:</dt>
<dd><p>Width of region.</p>
</dd>
<dt>rows:</dt>
<dd><p>Height of region.</p>
</dd>
<dt>quantum_operator:</dt>
<dd><p>Operator to use (AddQuantumOp,AndQuantumOp,
AssignQuantumOp, DepthQuantumOp, DivideQuantumOp, GammaQuantumOp,
LShiftQuantumOp, MultiplyQuantumOp, NegateQuantumOp,
NoiseGaussianQuantumOp, NoiseImpulseQuantumOp,
NoiseLaplacianQuantumOp, NoiseMultiplicativeQuantumOp,
NoisePoissonQuantumOp, NoiseRandomQuantumOp, NoiseUniformQuantumOp,
OrQuantumOp, RShiftQuantumOp, SubtractQuantumOp,
ThresholdBlackQuantumOp, ThresholdQuantumOp, ThresholdWhiteQuantumOp,
XorQuantumOp).</p>
</dd>
<dt>rvalue:</dt>
<dd><p>Operator argument.</p>
</dd>
<dt>exception:</dt>
<dd><p>Updated with error description.</p>
</dd>
</dl>
</div>
</div>
</div>
<hr class="docutils">
<div class="document">
<p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002 - 2023<!--SPONSOR_LOGO--></p>
</div>
</div>
</body>
</html>
|