1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
5
<style type="text/css" media="screen,projection"><!--
6
@import url("../../www/magick.css");
8
<meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />
9
<link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />
10
<title>ImageMagick: MagickWand, C API for ImageMagick: Pixel View Methods</title>
11
<meta http-equiv="Content-Language" content="en-US"/>
12
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
13
<meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
14
<meta name="Generator" content="PHP"/>
15
<meta name="Keywords" content="magickwc, api, for, imagemagick:, pixel, view, methods, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject"/>
16
<meta name="Description" content="ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically."/>
17
<meta name="Rating" content="GENERAL"/>
18
<meta name="Robots" content="INDEX, FOLLOW"/>
19
<meta name="Generator" content="ImageMagick Studio LLC"/>
20
<meta name="Author" content="ImageMagick Studio LLC"/>
21
<meta name="Revisit-after" content="2 DAYS"/>
22
<meta name="Resource-type" content="document"/>
23
<meta name="Copyright" content="Copyright (c) 1999-2008 ImageMagick Studio LLC"/>
24
<meta name="Distribution" content="Global"/>
25
<link rel="shortcut icon" href="../../images/wand.ico" type="images/vnd.microsoft.icon"/>
28
<body id="www-imagemagick-org">
29
<table id="titlebar" style="width: 100%;background-color: #f5f5f5" cellpadding="0" cellspacing="0" border="0" summary="ImageMagick">
32
<td align="left"><a href="../../index.html"><img id="titlebar-west" src="../../images/script.png" alt="[ImageMagick]" width="350" height="60" vspace="28" name="titlebar-west"/></a></td>
33
<td align="left"><a href="http://www.networkredux.com" target="803667562"><img id="titlebar-west" src="../../images/networkredux.png" alt="[sponsor]" border="0" vspace="45" name="titlebar-west"/></a></td>
34
<td width="99%"><br /> </td>
35
<td style="background-color: white" align="right"><a href="../../index.html"><img src="../../images/sprite.jpg" alt="" width="114" height="118" border="0" name="titlebar-east"/></a></td>
36
<td style="background-color: white" align="right"><a href="http://www.imagemagick.org/discourse-server/" target="757660912"><img id="titlebar-east" src="../../images/logo.jpg" alt="" width="114" height="118" border="0" name="titlebar-east"/></a></td>
41
<table style="width: 100%" border="0" cellpadding="0" cellspacing="0" summary="">
44
<tr valign="top" style="height: 100%;">
45
<td id="menu" width="1%" height="100%">
46
<p><a href="#main">Skip to page contents</a></p>
49
<a href="../../index.html">About ImageMagick</a>
50
<span>]</span><br /><span>[</span>
51
<a href="../../www/command-line-tools.html">Command-line Tools</a>
52
<a href="../../www/command-line-processing.html" class="sub">Processing</a>
53
<a href="../../www/command-line-options.html" class="sub">Options</a>
54
<a href="http://www.imagemagick.org/Usage/" target="211599108" class="sub">Usage</a>
55
<a href="../../www/api.html">Program Interfaces</a>
56
<a href="../../www/magick-wand.html" class="sub">MagickWand</a>
57
<a href="../../www/magick-core.html" class="sub">MagickCore</a>
58
<a href="../../www/perl-magick.html" class="sub">PerlMagick</a>
59
<a href="../../Magick++/" target="470508496" class="sub">Magick++</a>
60
<a href="../../www/architecture.html">Architecture</a>
61
<span>]</span><br /><span>[</span>
62
<a href="../../www/install-source.html">Install from Source</a>
63
<a href="../../www/install-source.html#unix" class="sub">Unix</a>
64
<a href="../../www/install-source.html#windows" class="sub">Windows</a>
65
<a href="../../www/binary-releases.html">Binary Releases</a>
66
<a href="../../www/binary-releases.html#unix" class="sub">Unix</a>
67
<a href="../../www/binary-releases.html#macosx" class="sub">Mac OS X</a>
68
<a href="../../www/binary-releases.html#windows" class="sub">Windows</a>
69
<a href="../../www/resources.html">Resources</a>
70
<span>]</span><br /><span>[</span>
71
<a href="../../www/download.html">Download</a>
72
<span>]</span><br /><span>[</span>
73
<a href="../../www/sitemap.html">Site Map</a>
74
<a href="../../www/links.html" class="sub">Links</a>
75
<span>]</span><br /><span>[</span>
76
<a href="../../www/sponsors.html">Sponsors:</a>
78
<a href="http://www.produkte24.com" class="sponsor" target="sponsor">Kataloge zum<br />Herunterladen</a><!-- 200910010000 -->
80
<a href="http://meta-preisvergleich.de" class="sponsor" target="sponsor">Preisvergleich</a><!-- 200901010120 -->
82
<a href="http://www.checkcost.co.uk" class="sponsor" target="sponsor">Compare</a><!-- 200902010720 -->
84
<a href="http://www.ecostsoftware.com" class="sponsor" target="sponsor">Software</a><!-- 200902010720 -->
86
<a href="http://www.callerbase.com" class="sponsor" target="sponsor">Phone Number<br />Search</a><!-- 200812010040 -->
88
<a href="http://www.online-kredit-index.de" class="sponsor" target="sponsor">Kredit</a><!-- 200903010120 -->
90
<a href="http://www.posters555.com" class="sponsor" target="sponsor">Poster</a><!-- 200903010800 -->
92
<a href="http://www.iceposter.com" class="sponsor" target="sponsor">Posters</a><!-- 200812010200 -->
94
<a href="http://www.imade-art.de"><img src="../../images/imade_art2.jpg" alt="[Kunst bei imade-art]" width="116" height="28" border="0" name="Kunst bei imade-art"/></a> <!-- 200811010160 -->
100
<td id="main" valign="top">
101
<p class="navigation-index">[ <a href="#ClonePixelView">ClonePixelView</a> | <a href="#DestroyPixelView">DestroyPixelView</a> | <a href="#DuplexTransferPixelViewIterator">DuplexTransferPixelViewIterator</a> | <a href="#GetPixelViewException">GetPixelViewException</a> | <a href="#GetPixelViewHeight">GetPixelViewHeight</a> | <a href="#GetPixelViewIterator">GetPixelViewIterator</a> | <a href="#GetPixelViewPixels">GetPixelViewPixels</a> | <a href="#GetPixelViewWand">GetPixelViewWand</a> | <a href="#GetPixelViewWidth">GetPixelViewWidth</a> | <a href="#GetPixelViewX">GetPixelViewX</a> | <a href="#GetPixelViewY">GetPixelViewY</a> | <a href="#IsPixelView">IsPixelView</a> | <a href="#NewPixelView">NewPixelView</a> | <a href="#NewPixelViewRegion">NewPixelViewRegion</a> | <a href="#SetPixelViewIterator">SetPixelViewIterator</a> | <a href="#TransferPixelViewIterator">TransferPixelViewIterator</a> | <a href="#UpdatePixelViewIterator">UpdatePixelViewIterator</a> ]</p>
103
<div style="margin: auto;">
104
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
105
_8c.html" target="source" name="ClonePixelView">ClonePixelView</a></h2>
108
<p>ClonePixelView() makes a copy of the specified pixel view.</p></ol>
110
<p>The format of the ClonePixelView method is:</p>
113
PixelView *ClonePixelView(const PixelView *pixel_view)
116
<p>A description of each parameter follows:</p></ol>
119
<ol><p>the pixel view.</p></ol>
121
<div style="margin: auto;">
122
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
123
_8c.html" target="source" name="DestroyPixelView">DestroyPixelView</a></h2>
126
<p>DestroyPixelView() deallocates memory associated with a pixel view.</p></ol>
128
<p>The format of the DestroyPixelView method is:</p>
131
PixelView *DestroyPixelView(PixelView *pixel_view)
134
<p>A description of each parameter follows:</p></ol>
137
<ol><p>the pixel view.</p></ol>
139
<div style="margin: auto;">
140
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
141
_8c.html" target="source" name="DuplexTransferPixelViewIterator">DuplexTransferPixelViewIterator</a></h2>
144
<p>DuplexTransferPixelViewIterator() iterates over three pixel views in parallel and calls your transfer method for each scanline of the view. The source and duplex pixel region is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. However, the destination pixel view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p></ol>
146
<p>Use this pragma:</p>
152
<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p></ol>
154
<p>The format of the DuplexTransferPixelViewIterator method is:</p>
157
MagickBooleanType DuplexTransferPixelViewIterator(PixelView *source,
158
PixelView *duplex,PixelView *destination,
159
DuplexTransferPixelViewMethod transfer,void *context)
162
<p>A description of each parameter follows:</p></ol>
165
<ol><p>the source pixel view.</p></ol>
168
<ol><p>the duplex pixel view.</p></ol>
171
<ol><p>the destination pixel view.</p></ol>
174
<ol><p>the transfer callback method.</p></ol>
177
<ol><p>the user defined context.</p></ol>
179
<div style="margin: auto;">
180
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
181
_8c.html" target="source" name="GetPixelViewException">GetPixelViewException</a></h2>
184
<p>GetPixelViewException() returns the severity, reason, and description of any error that occurs when utilizing a pixel view.</p></ol>
186
<p>The format of the GetPixelViewException method is:</p>
189
char *GetPixelViewException(const PixelWand *pixel_view,
190
ExceptionType *severity)
193
<p>A description of each parameter follows:</p></ol>
196
<ol><p>the pixel pixel_view.</p></ol>
199
<ol><p>the severity of the error is returned here.</p></ol>
201
<div style="margin: auto;">
202
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
203
_8c.html" target="source" name="GetPixelViewHeight">GetPixelViewHeight</a></h2>
206
<p>GetPixelViewHeight() returns the pixel view height.</p></ol>
208
<p>The format of the GetPixelViewHeight method is:</p>
211
unsigned long GetPixelViewHeight(const PixelView *pixel_view)
214
<p>A description of each parameter follows:</p></ol>
217
<ol><p>the pixel view.</p></ol>
219
<div style="margin: auto;">
220
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
221
_8c.html" target="source" name="GetPixelViewIterator">GetPixelViewIterator</a></h2>
224
<p>GetPixelViewIterator() iterates over the pixel view in parallel and calls your get method for each scanline of the view. The pixel region is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. Any updates to the pixels in your callback are ignored.</p></ol>
226
<p>Use this pragma:</p>
232
<p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p></ol>
234
<p>The format of the GetPixelViewIterator method is:</p>
237
MagickBooleanType GetPixelViewIterator(PixelView *source,
238
GetPixelViewMethod get,void *context)
241
<p>A description of each parameter follows:</p></ol>
244
<ol><p>the source pixel view.</p></ol>
247
<ol><p>the get callback method.</p></ol>
250
<ol><p>the user defined context.</p></ol>
252
<div style="margin: auto;">
253
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
254
_8c.html" target="source" name="GetPixelViewPixels">GetPixelViewPixels</a></h2>
257
<p>GetPixelViewPixels() returns the pixel view pixel_wands.</p></ol>
259
<p>The format of the GetPixelViewPixels method is:</p>
262
PixelWand *GetPixelViewPixels(const PixelView *pixel_view)
265
<p>A description of each parameter follows:</p></ol>
268
<ol><p>the pixel view.</p></ol>
270
<div style="margin: auto;">
271
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
272
_8c.html" target="source" name="GetPixelViewWand">GetPixelViewWand</a></h2>
275
<p>GetPixelViewWand() returns the magick wand associated with the pixel view.</p></ol>
277
<p>The format of the GetPixelViewWand method is:</p>
280
MagickWand *GetPixelViewWand(const PixelView *pixel_view)
283
<p>A description of each parameter follows:</p></ol>
286
<ol><p>the pixel view.</p></ol>
288
<div style="margin: auto;">
289
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
290
_8c.html" target="source" name="GetPixelViewWidth">GetPixelViewWidth</a></h2>
293
<p>GetPixelViewWidth() returns the pixel view width.</p></ol>
295
<p>The format of the GetPixelViewWidth method is:</p>
298
unsigned long GetPixelViewWidth(const PixelView *pixel_view)
301
<p>A description of each parameter follows:</p></ol>
304
<ol><p>the pixel view.</p></ol>
306
<div style="margin: auto;">
307
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
308
_8c.html" target="source" name="GetPixelViewX">GetPixelViewX</a></h2>
311
<p>GetPixelViewX() returns the pixel view x offset.</p></ol>
313
<p>The format of the GetPixelViewX method is:</p>
316
long GetPixelViewX(const PixelView *pixel_view)
319
<p>A description of each parameter follows:</p></ol>
322
<ol><p>the pixel view.</p></ol>
324
<div style="margin: auto;">
325
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
326
_8c.html" target="source" name="GetPixelViewY">GetPixelViewY</a></h2>
329
<p>GetPixelViewY() returns the pixel view y offset.</p></ol>
331
<p>The format of the GetPixelViewY method is:</p>
334
long GetPixelViewY(const PixelView *pixel_view)
337
<p>A description of each parameter follows:</p></ol>
340
<ol><p>the pixel view.</p></ol>
342
<div style="margin: auto;">
343
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
344
_8c.html" target="source" name="IsPixelView">IsPixelView</a></h2>
347
<p>IsPixelView() returns MagickTrue if the the parameter is verified as a pixel view container.</p></ol>
349
<p>The format of the IsPixelView method is:</p>
352
MagickBooleanType IsPixelView(const PixelView *pixel_view)
355
<p>A description of each parameter follows:</p></ol>
358
<ol><p>the pixel view.</p></ol>
360
<div style="margin: auto;">
361
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
362
_8c.html" target="source" name="NewPixelView">NewPixelView</a></h2>
365
<p>NewPixelView() returns a pixel view required for all other methods in the Pixel View API.</p></ol>
367
<p>The format of the NewPixelView method is:</p>
370
PixelView *NewPixelView(MagickWand *wand)
373
<p>A description of each parameter follows:</p></ol>
376
<ol><p>the wand.</p></ol>
378
<div style="margin: auto;">
379
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
380
_8c.html" target="source" name="NewPixelViewRegion">NewPixelViewRegion</a></h2>
383
<p>NewPixelViewRegion() returns a pixel view required for all other methods in the Pixel View API.</p></ol>
385
<p>The format of the NewPixelViewRegion method is:</p>
388
PixelView *NewPixelViewRegion(MagickWand *wand,const long x,
389
const long y,const unsigned long width,const unsigned long height)
392
<p>A description of each parameter follows:</p></ol>
395
<ol><p>the magick wand.</p></ol>
397
<h5>x,y,columns,rows</h5>
398
<ol><p>These values define the perimeter of a region of pixel_wands view.</p></ol>
400
<div style="margin: auto;">
401
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
402
_8c.html" target="source" name="SetPixelViewIterator">SetPixelViewIterator</a></h2>
405
<p>SetPixelViewIterator() iterates over the pixel view in parallel and calls your set method for each scanline of the view. The pixel region is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension. The pixels are initiallly undefined and any settings you make in the callback method are automagically synced back to your image.</p></ol>
407
<p>Use this pragma:</p>
413
<p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p></ol>
415
<p>The format of the SetPixelViewIterator method is:</p>
418
MagickBooleanType SetPixelViewIterator(PixelView *destination,
419
SetPixelViewMethod set,void *context)
422
<p>A description of each parameter follows:</p></ol>
425
<ol><p>the pixel view.</p></ol>
428
<ol><p>the set callback method.</p></ol>
431
<ol><p>the user defined context.</p></ol>
433
<div style="margin: auto;">
434
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
435
_8c.html" target="source" name="TransferPixelViewIterator">TransferPixelViewIterator</a></h2>
438
<p>TransferPixelViewIterator() iterates over two pixel views in parallel and calls your transfer method for each scanline of the view. The source pixel region is not confined to the image canvas-- that is you can include negative offsets or widths or heights that exceed the image dimension. However, the destination pixel view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p></ol>
440
<p>Use this pragma:</p>
446
<p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p></ol>
448
<p>The format of the TransferPixelViewIterator method is:</p>
451
MagickBooleanType TransferPixelViewIterator(PixelView *source,
452
PixelView *destination,TransferPixelViewMethod transfer,void *context)
455
<p>A description of each parameter follows:</p></ol>
458
<ol><p>the source pixel view.</p></ol>
461
<ol><p>the destination pixel view.</p></ol>
464
<ol><p>the transfer callback method.</p></ol>
467
<ol><p>the user defined context.</p></ol>
469
<div style="margin: auto;">
470
<h2><a href="http://www.imagemagick.org/api/MagickWand/pixel-view
471
_8c.html" target="source" name="UpdatePixelViewIterator">UpdatePixelViewIterator</a></h2>
474
<p>UpdatePixelViewIterator() iterates over the pixel view in parallel and calls your update method for each scanline of the view. The pixel region is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted. Updates to pixels in your callback are automagically synced back to the image.</p></ol>
476
<p>Use this pragma:</p>
482
<p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p></ol>
484
<p>The format of the UpdatePixelViewIterator method is:</p>
487
MagickBooleanType UpdatePixelViewIterator(PixelView *source,
488
UpdatePixelViewMethod update,void *context)
491
<p>A description of each parameter follows:</p></ol>
494
<ol><p>the source pixel view.</p></ol>
497
<ol><p>the update callback method.</p></ol>
500
<ol><p>the user defined context.</p></ol>
503
<td id="margin" width="1%" height="100%" valign="top" align="right"> </td>
508
<span id="linkbar-west">
512
<span id="linkbar-center">
513
<a href="http://www.imagemagick.org/discourse-server/" target="121726703">Discourse Server</a> •
514
<a href="../../www/mailing-list.html">Mailing Lists</a> •
515
<a href="http://cafe.imagemagick.org" target="1511433165">Cafe</a> •
516
<a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi" target="1178098251">Studio</a>
518
<span id="linkbar-east">
524
<span id="footer-west">© 1999-2008 ImageMagick Studio LLC</span>
526
<div style="clear: both; margin: 0; width: 100%; "></div>