File: paint.html

package info (click to toggle)
imagemagick 6%3A6.0.6.2-2.9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 33,284 kB
  • ctags: 14,844
  • sloc: ansic: 190,790; cpp: 17,203; sh: 8,740; perl: 4,190; makefile: 1,740; tcl: 459
file content (210 lines) | stat: -rw-r--r-- 10,380 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>paint - Paint on an Image</title>
<link rel="stylesheet" type="text/css" href="../magick.css">
</head>

<body marginheight="1" marginwidth="1" topmargin="1" leftmargin="1">
<a name="top"></a> 
<table border="0" cellpadding="0" cellspacing="0" summary="Masthead" width="100%">
<tbody>
<tr>
<td bgcolor="#003399" width="25%" height="118" background="../../images/background.gif"><a href="http://www.imagemagick.org/"><img src="../../images/script.gif" width="278" height="118" border="0" alt="" /></a></td>
<td bgcolor="#003399" width="60%" height="118" background="../../images/background.gif"><a href="http://www.networkeleven.com/direct.php?magick_all"><img src="../../images/promote.png" border="0" width="186" height="52" vspace="29" alt="Powered by NetworkEleven" /></a></td>
<td bgcolor="#003399" width="114" height="118" align="right"><img src="../../images/sprite.png" width="114" height="118" alt="" /></td>
<td bgcolor="#003399" width="114" height="118" align="right"><a href="http://www.imagemagick.net"><img src="../../images/logo.png" width="114" height="118" border="0" alt="ImageMagick logo" /></a></td>
</tr></tbody></table>
<table align="left" border="0" cellpadding="2" cellspacing="2" summary="Navigation buttons" width="20%">
<tr>
<td>
<form target="_self" action="../../index.html"><input type="submit" title="ImageMagick Home" value=" Home" style="background-color: #1947A3; background-image:url('../../../images/background.gif'); color:#fbc713; font-weight:bold"></form></td>
<td>
<form target="_self" action="../../www/apis.html"><input type="submit" title="ImageMagick API" value=" API " style="background-color: #1947A3; background-image:url('../../../images/background.gif'); color:#fbc713; font-weight:bold"></form></td>
<td>
<form target="_self" action="../../www/archives.html"><input type="submit" title="ImageMagick Download" value="Download" style="background-color: #1947A3; background-image:url('../../../images/background.gif'); color:#fbc713; font-weight:bold"></form></td></tr></table>
<div align="right" style="margin-top:3px; padding-right:4px">
<form action="http://studio.imagemagick.org/Sage/scripts/Sage.cgi"><input type="TEXT" name="query" size="32" maxlength="255"> <input type="SUBMIT" name="sa" value="Search" style="background-color: #1947A3; background-image:url('../../../images/background.gif'); bgcolor:#003399; color:#fbc713; font-weight:bold"></form></div>
<table align="left" border="0" cellpadding="10" cellspacing="0" style="margin-top:-17px" width="100%">
<tr>
<td>


<P><a name="__index__"></a></P>
<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#function_descriptions">FUNCTION DESCRIPTIONS</a></li>
	<ul>

		<li><a href="#colorfloodfillimage">ColorFloodfillImage</a></li>
		<li><a href="#mattefloodfillimage">MatteFloodfillImage</a></li>
		<li><a href="#opaqueimage">OpaqueImage</a></li>
		<li><a href="#transparentimage">TransparentImage</a></li>
	</ul>

</ul>
<!-- INDEX END -->

<hr />
<P>
</P>
<h1><a name="name">NAME</a></h1>
<P>paint - Paint on an Image</P>
<P>
</P>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<P>MagickBooleanType  <strong>ColorFloodfillImage</strong>( Image *image, const DrawInfo *draw_info, const PixelPacket target, const long x_offset, const long y_offset, const PaintMethod method );</P>
<P>MagickBooleanType  <strong>MatteFloodfillImage</strong>( Image *image, const PixelPacket target, const Quantum opacity, const long x_offset, const long y_offset, const PaintMethod method );</P>
<P>MagickBooleanType  <strong>OpaqueImage</strong>( Image *image, const PixelPacket target, const PixelPacket fill );</P>
<P>MagickBooleanType  <strong>TransparentImage</strong>( Image *image, const PixelPacket target, const Quantum opacity );</P>
<P>
</P>
<hr />
<h1><a name="function_descriptions">FUNCTION DESCRIPTIONS</a></h1>
<P>
</P>
<h2><a name="colorfloodfillimage">ColorFloodfillImage</a></h2>
<P><code>ColorFloodfill()</code> changes the color value of any pixel that matches target and is an immediate neighbor.  If the method FillToBorderMethod is specified, the color value is changed for any neighbor pixel that does not match the bordercolor member of image.</P>
<P>By default target must match a particular pixel color exactly.  However, in many cases two colors may differ by a small amount.  The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same.  For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.</P>
<P>The format of the ColorFloodfillImage method is:</P>
<blockquote>MagickBooleanType ColorFloodfillImage ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#DrawInfo">DrawInfo</A> *draw_info, const <A HREF="types.html#PixelPacket">PixelPacket</A> target, const long x_offset, const long y_offset, const <A HREF="types.html#PaintMethod">PaintMethod</A> method ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong><a name="item_o_image_3a">image:</a></strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_draw_info_3a">draw_info:</a></strong><br />
</dt>
<DD>
The draw info.
</dd>
<P></P>
<dt><strong><a name="item_o_target_3a">target:</a></strong><br />
</dt>
<DD>
The RGB value of the target color.
</dd>
<P></P>
<dt><strong><a name="item_o_x_2cy_3a">x,y:</a></strong><br />
</dt>
<DD>
The starting location of the operation.
</dd>
<P></P>
<dt><strong><a name="item_o_method_3a">method:</a></strong><br />
</dt>
<DD>
Choose either FloodfillMethod or FillToBorderMethod.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="mattefloodfillimage">MatteFloodfillImage</a></h2>
<P><code>MatteFloodfill()</code> changes the transparency value of any pixel that matches target and is an immediate neighbor.  If the method FillToBorderMethod is specified, the transparency value is changed for any neighbor pixel that does not match the bordercolor member of image.</P>
<P>By default target must match a particular pixel transparency exactly.  However, in many cases two transparency values may differ by a small amount.  The fuzz member of image defines how much tolerance is acceptable to consider two transparency values as the same.  For example, set fuzz to 10 and the opacity values of 100 and 102 respectively are now interpreted as the same value for the purposes of the floodfill.</P>
<P>The format of the MatteFloodfillImage method is:</P>
<blockquote>MagickBooleanType MatteFloodfillImage ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#PixelPacket">PixelPacket</A> target, const <A HREF="types.html#Quantum">Quantum</A> opacity, const long x_offset, const long y_offset, const <A HREF="types.html#PaintMethod">PaintMethod</A> method ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>target:</strong><br />
</dt>
<DD>
The RGB value of the target color.
</dd>
<P></P>
<dt><strong><a name="item_o_opacity_3a">opacity:</a></strong><br />
</dt>
<DD>
The level of transparency: 0 is fully opaque and MaxRGB is fully transparent.
</dd>
<P></P>
<dt><strong>x,y:</strong><br />
</dt>
<DD>
The starting location of the operation.
</dd>
<P></P>
<dt><strong>method:</strong><br />
</dt>
<DD>
Choose either FloodfillMethod or FillToBorderMethod.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="opaqueimage">OpaqueImage</a></h2>
<blockquote>OpaqueImage() changes any pixel that matches color with the color defined by fill. </blockquote><P>By default color must match a particular pixel color exactly.  However, in many cases two colors may differ by a small amount.  Fuzz defines how much tolerance is acceptable to consider two colors as the same.  For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.</P>
<P>The format of the OpaqueImage method is:</P>
<blockquote>MagickBooleanType OpaqueImage ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#PixelPacket">PixelPacket</A> target, const <A HREF="types.html#PixelPacket">PixelPacket</A> fill ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>target:</strong><br />
</dt>
<DD>
The RGB value of the target color.
</dd>
<P></P>
<dt><strong><a name="item_o_fill_3a">fill:</a></strong><br />
</dt>
<DD>
The replacement color.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="transparentimage">TransparentImage</a></h2>
<blockquote>TransparentImage() changes the opacity value associated with any pixel that matches color to the value defined by opacity. </blockquote><P>By default color must match a particular pixel color exactly.  However, in many cases two colors may differ by a small amount.  Fuzz defines how much tolerance is acceptable to consider two colors as the same.  For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color.</P>
<P>The format of the TransparentImage method is:</P>
<blockquote>MagickBooleanType TransparentImage ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#PixelPacket">PixelPacket</A> target, const <A HREF="types.html#Quantum">Quantum</A> opacity ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>target:</strong><br />
</dt>
<DD>
The RGB value of the target color.
</dd>
<P></P>
<dt><strong>opacity:</strong><br />
</dt>
<DD>
The replacement opacity value.
</dd>
</dl>


<HR>

<a href="#top"><img src="../../../images/top.gif" border=0 width=42 height=42 align="right" alt="Top of page"></a>
<form action="http://studio.imagemagick.org/magick/" style="margin-top:5px">
<input type="submit" title="Help!" value="Help!" style="background-image:url('../../../images/background.gif'); color:#fbc713; font-weight:bold">
  <small>&quot;Image manipulation software that works like magick&quot;</small>
</form></td>
</tr></table>

</body>


</html>