Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 1 | |
| 2 | |
| 3 | |
| 4 | |
cristy | 29dc865 | 2015-05-12 16:26:21 +0000 | [diff] [blame] | 5 | <!DOCTYPE html> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 6 | <html lang="en"> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 7 | <head> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 8 | <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 9 | <title>ImageMagick: MagickCore, C API for ImageMagick: Image View Methods</title> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 10 | <meta http-equiv="content-type" content="text/html; charset=utf-8"/> |
| 11 | <meta name="application-name" content="ImageMagick"/> |
| 12 | <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/> |
| 13 | <meta name="application-url" content="http://www.imagemagick.org"/> |
| 14 | <meta name="generator" content="PHP"/> |
| 15 | <meta name="keywords" content="magickcore, c, api, for, imagemagick:, image, view, methods, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/> |
| 16 | <meta name="rating" content="GENERAL"/> |
| 17 | <meta name="robots" content="INDEX, FOLLOW"/> |
| 18 | <meta name="generator" content="ImageMagick Studio LLC"/> |
| 19 | <meta name="author" content="ImageMagick Studio LLC"/> |
| 20 | <meta name="revisit-after" content="2 DAYS"/> |
| 21 | <meta name="resource-type" content="document"/> |
Cristy | ce4a355 | 2015-12-14 13:53:35 -0500 | [diff] [blame] | 22 | <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"/> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 23 | <meta name="distribution" content="Global"/> |
| 24 | <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/> |
| 25 | <link rel="icon" href="../images/wand.png"/> |
| 26 | <link rel="shortcut icon" href="../images/wand.ico"/> |
| 27 | <link rel="stylesheet" href="../css/magick.html"/> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 28 | </head> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 29 | <body> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 30 | <div class="main"> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 31 | <div class="magick-masthead"> |
| 32 | <div class="container"> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 33 | <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 34 | style="display:block" |
| 35 | data-ad-client="ca-pub-3129977114552745" |
| 36 | data-ad-slot="6345125851" |
| 37 | data-ad-format="auto"></ins> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 38 | <script> |
Cristy | 542697a | 2015-10-12 20:10:32 -0400 | [diff] [blame] | 39 | (adsbygoogle = window.adsbygoogle || []).push({}); |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 40 | </script> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 41 | <nav class="magick-nav"> |
cristy | 2f563d4 | 2015-05-06 23:36:51 +0000 | [diff] [blame] | 42 | <a class="magick-nav-item " href="../index.html">Home</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 43 | <a class="magick-nav-item " href="../binary-releases.html">Download</a> |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 44 | <a class="magick-nav-item " href="../command-line-tools.html">Tools</a> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 45 | <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 46 | <a class="magick-nav-item " href="../resources.html">Resources</a> |
| 47 | <a class="magick-nav-item " href="api.html">Develop</a> |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 48 | <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a> |
cristy | a1890f0 | 2015-05-15 23:32:44 +0000 | [diff] [blame] | 49 | <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 50 | </nav> |
| 51 | </div> |
| 52 | </div> |
| 53 | <div class="container"> |
cristy | 4e638cd | 2015-05-07 16:47:40 +0000 | [diff] [blame] | 54 | <div class="magick-header"> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 55 | <p class="text-center"><a href="image-view.html#CloneImageView">CloneImageView</a> • <a href="image-view.html#DestroyImageView">DestroyImageView</a> • <a href="image-view.html#DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a> • <a href="image-view.html#GetImageViewAuthenticMetacontent">GetImageViewAuthenticMetacontent</a> • <a href="image-view.html#GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a> • <a href="image-view.html#GetImageViewException">GetImageViewException</a> • <a href="image-view.html#GetImageViewExtent">GetImageViewExtent</a> • <a href="image-view.html#GetImageViewImage">GetImageViewImage</a> • <a href="image-view.html#GetImageViewIterator">GetImageViewIterator</a> • <a href="image-view.html#GetImageViewVirtualMetacontent">GetImageViewVirtualMetacontent</a> • <a href="image-view.html#GetImageViewVirtualPixels">GetImageViewVirtualPixels</a> • <a href="image-view.html#IsImageView">IsImageView</a> • <a href="image-view.html#NewImageView">NewImageView</a> • <a href="image-view.html#NewImageViewRegion">NewImageViewRegion</a> • <a href="image-view.html#SetImageViewDescription">SetImageViewDescription</a> • <a href="image-view.html#SetImageViewIterator">SetImageViewIterator</a> • <a href="image-view.html#TransferImageViewIterator">TransferImageViewIterator</a> • <a href="image-view.html#UpdateImageViewIterator">UpdateImageViewIterator</a></p> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 56 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 57 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="CloneImageView">CloneImageView</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 58 | |
| 59 | <p>CloneImageView() makes a copy of the specified image view.</p> |
| 60 | |
| 61 | <p>The format of the CloneImageView method is:</p> |
| 62 | |
| 63 | <pre class="text"> |
| 64 | ImageView *CloneImageView(const ImageView *image_view) |
| 65 | </pre> |
| 66 | |
| 67 | <p>A description of each parameter follows:</p> |
| 68 | |
| 69 | <dd> |
| 70 | </dd> |
| 71 | |
| 72 | <dd> </dd> |
| 73 | <dl class="dl-horizontal"> |
| 74 | <dt>image_view</dt> |
| 75 | <dd>the image view. </dd> |
| 76 | |
| 77 | <dd> </dd> |
| 78 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 79 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DestroyImageView">DestroyImageView</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 80 | |
| 81 | <p>DestroyImageView() deallocates memory associated with a image view.</p> |
| 82 | |
| 83 | <p>The format of the DestroyImageView method is:</p> |
| 84 | |
| 85 | <pre class="text"> |
| 86 | ImageView *DestroyImageView(ImageView *image_view) |
| 87 | </pre> |
| 88 | |
| 89 | <p>A description of each parameter follows:</p> |
| 90 | |
| 91 | <dd> |
| 92 | </dd> |
| 93 | |
| 94 | <dd> </dd> |
| 95 | <dl class="dl-horizontal"> |
| 96 | <dt>image_view</dt> |
| 97 | <dd>the image view. </dd> |
| 98 | |
| 99 | <dd> </dd> |
| 100 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 101 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="DuplexTransferImageViewIterator">DuplexTransferImageViewIterator</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 102 | |
| 103 | <p>DuplexTransferImageViewIterator() iterates over three image views in parallel and calls your transfer method for each scanline of the view. The source and duplex pixel extent 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 image view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p> |
| 104 | |
| 105 | <p>The callback signature is:</p> |
| 106 | |
| 107 | <pre class="text"> |
| 108 | MagickBooleanType DuplexTransferImageViewMethod(const ImageView *source, |
| 109 | const ImageView *duplex,ImageView *destination,const ssize_t y, |
| 110 | const int thread_id,void *context) |
| 111 | </pre> |
| 112 | |
| 113 | <p>Use this pragma if the view is not single threaded:</p> |
| 114 | |
| 115 | <pre class="text"> |
| 116 | #pragma omp critical |
| 117 | </pre> |
| 118 | |
| 119 | <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p> |
| 120 | |
| 121 | <p>The format of the DuplexTransferImageViewIterator method is:</p> |
| 122 | |
| 123 | <pre class="text"> |
| 124 | MagickBooleanType DuplexTransferImageViewIterator(ImageView *source, |
| 125 | ImageView *duplex,ImageView *destination, |
| 126 | DuplexTransferImageViewMethod transfer,void *context) |
| 127 | </pre> |
| 128 | |
| 129 | <p>A description of each parameter follows:</p> |
| 130 | |
| 131 | <dd> |
| 132 | </dd> |
| 133 | |
| 134 | <dd> </dd> |
| 135 | <dl class="dl-horizontal"> |
| 136 | <dt>source</dt> |
| 137 | <dd>the source image view. </dd> |
| 138 | |
| 139 | <dd> </dd> |
| 140 | <dt>duplex</dt> |
| 141 | <dd>the duplex image view. </dd> |
| 142 | |
| 143 | <dd> </dd> |
| 144 | <dt>destination</dt> |
| 145 | <dd>the destination image view. </dd> |
| 146 | |
| 147 | <dd> </dd> |
| 148 | <dt>transfer</dt> |
| 149 | <dd>the transfer callback method. </dd> |
| 150 | |
| 151 | <dd> </dd> |
| 152 | <dt>context</dt> |
| 153 | <dd>the user defined context. </dd> |
| 154 | |
| 155 | <dd> </dd> |
| 156 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 157 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticMetacontent">GetImageViewAuthenticMetacontent</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 158 | |
| 159 | <p>GetImageViewAuthenticMetacontent() returns the image view authentic meta-content.</p> |
| 160 | |
| 161 | <p>The format of the GetImageViewAuthenticPixels method is:</p> |
| 162 | |
| 163 | <pre class="text"> |
| 164 | void *GetImageViewAuthenticMetacontent( |
| 165 | const ImageView *image_view) |
| 166 | </pre> |
| 167 | |
| 168 | <p>A description of each parameter follows:</p> |
| 169 | |
| 170 | <dd> |
| 171 | </dd> |
| 172 | |
| 173 | <dd> </dd> |
| 174 | <dl class="dl-horizontal"> |
| 175 | <dt>image_view</dt> |
| 176 | <dd>the image view. </dd> |
| 177 | |
| 178 | <dd> </dd> |
| 179 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 180 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewAuthenticPixels">GetImageViewAuthenticPixels</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 181 | |
| 182 | <p>GetImageViewAuthenticPixels() returns the image view authentic pixels.</p> |
| 183 | |
| 184 | <p>The format of the GetImageViewAuthenticPixels method is:</p> |
| 185 | |
| 186 | <pre class="text"> |
| 187 | Quantum *GetImageViewAuthenticPixels(const ImageView *image_view) |
| 188 | </pre> |
| 189 | |
| 190 | <p>A description of each parameter follows:</p> |
| 191 | |
| 192 | <dd> |
| 193 | </dd> |
| 194 | |
| 195 | <dd> </dd> |
| 196 | <dl class="dl-horizontal"> |
| 197 | <dt>image_view</dt> |
| 198 | <dd>the image view. </dd> |
| 199 | |
| 200 | <dd> </dd> |
| 201 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 202 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewException">GetImageViewException</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 203 | |
| 204 | <p>GetImageViewException() returns the severity, reason, and description of any error that occurs when utilizing a image view.</p> |
| 205 | |
| 206 | <p>The format of the GetImageViewException method is:</p> |
| 207 | |
| 208 | <pre class="text"> |
| 209 | char *GetImageViewException(const PixelImage *image_view, |
| 210 | ExceptionType *severity) |
| 211 | </pre> |
| 212 | |
| 213 | <p>A description of each parameter follows:</p> |
| 214 | |
| 215 | <dd> |
| 216 | </dd> |
| 217 | |
| 218 | <dd> </dd> |
| 219 | <dl class="dl-horizontal"> |
| 220 | <dt>image_view</dt> |
| 221 | <dd>the pixel image_view. </dd> |
| 222 | |
| 223 | <dd> </dd> |
| 224 | <dt>severity</dt> |
| 225 | <dd>the severity of the error is returned here. </dd> |
| 226 | |
| 227 | <dd> </dd> |
| 228 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 229 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewExtent">GetImageViewExtent</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 230 | |
| 231 | <p>GetImageViewExtent() returns the image view extent.</p> |
| 232 | |
| 233 | <p>The format of the GetImageViewExtent method is:</p> |
| 234 | |
| 235 | <pre class="text"> |
| 236 | RectangleInfo GetImageViewExtent(const ImageView *image_view) |
| 237 | </pre> |
| 238 | |
| 239 | <p>A description of each parameter follows:</p> |
| 240 | |
| 241 | <dd> |
| 242 | </dd> |
| 243 | |
| 244 | <dd> </dd> |
| 245 | <dl class="dl-horizontal"> |
| 246 | <dt>image_view</dt> |
| 247 | <dd>the image view. </dd> |
| 248 | |
| 249 | <dd> </dd> |
| 250 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 251 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewImage">GetImageViewImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 252 | |
| 253 | <p>GetImageViewImage() returns the image associated with the image view.</p> |
| 254 | |
| 255 | <p>The format of the GetImageViewImage method is:</p> |
| 256 | |
| 257 | <pre class="text"> |
| 258 | MagickCore *GetImageViewImage(const ImageView *image_view) |
| 259 | </pre> |
| 260 | |
| 261 | <p>A description of each parameter follows:</p> |
| 262 | |
| 263 | <dd> |
| 264 | </dd> |
| 265 | |
| 266 | <dd> </dd> |
| 267 | <dl class="dl-horizontal"> |
| 268 | <dt>image_view</dt> |
| 269 | <dd>the image view. </dd> |
| 270 | |
| 271 | <dd> </dd> |
| 272 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 273 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewIterator">GetImageViewIterator</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 274 | |
| 275 | <p>GetImageViewIterator() iterates over the image view in parallel and calls your get method for each scanline of the view. The pixel extent 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> |
| 276 | |
| 277 | <p>The callback signature is:</p> |
| 278 | |
| 279 | <pre class="text"> |
| 280 | MagickBooleanType GetImageViewMethod(const ImageView *source, |
| 281 | const ssize_t y,const int thread_id,void *context) |
| 282 | </pre> |
| 283 | |
| 284 | <p>Use this pragma if the view is not single threaded:</p> |
| 285 | |
| 286 | <pre class="text"> |
| 287 | #pragma omp critical |
| 288 | </pre> |
| 289 | |
| 290 | <p>to define a section of code in your callback get method that must be executed by a single thread at a time.</p> |
| 291 | |
| 292 | <p>The format of the GetImageViewIterator method is:</p> |
| 293 | |
| 294 | <pre class="text"> |
| 295 | MagickBooleanType GetImageViewIterator(ImageView *source, |
| 296 | GetImageViewMethod get,void *context) |
| 297 | </pre> |
| 298 | |
| 299 | <p>A description of each parameter follows:</p> |
| 300 | |
| 301 | <dd> |
| 302 | </dd> |
| 303 | |
| 304 | <dd> </dd> |
| 305 | <dl class="dl-horizontal"> |
| 306 | <dt>source</dt> |
| 307 | <dd>the source image view. </dd> |
| 308 | |
| 309 | <dd> </dd> |
| 310 | <dt>get</dt> |
| 311 | <dd>the get callback method. </dd> |
| 312 | |
| 313 | <dd> </dd> |
| 314 | <dt>context</dt> |
| 315 | <dd>the user defined context. </dd> |
| 316 | |
| 317 | <dd> </dd> |
| 318 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 319 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualMetacontent">GetImageViewVirtualMetacontent</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 320 | |
| 321 | <p>GetImageViewVirtualMetacontent() returns the image view virtual meta-content.</p> |
| 322 | |
| 323 | <p>The format of the GetImageViewVirtualMetacontent method is:</p> |
| 324 | |
| 325 | <pre class="text"> |
| 326 | const void *GetImageViewVirtualMetacontent( |
| 327 | const ImageView *image_view) |
| 328 | </pre> |
| 329 | |
| 330 | <p>A description of each parameter follows:</p> |
| 331 | |
| 332 | <dd> |
| 333 | </dd> |
| 334 | |
| 335 | <dd> </dd> |
| 336 | <dl class="dl-horizontal"> |
| 337 | <dt>image_view</dt> |
| 338 | <dd>the image view. </dd> |
| 339 | |
| 340 | <dd> </dd> |
| 341 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 342 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="GetImageViewVirtualPixels">GetImageViewVirtualPixels</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 343 | |
| 344 | <p>GetImageViewVirtualPixels() returns the image view virtual pixels.</p> |
| 345 | |
| 346 | <p>The format of the GetImageViewVirtualPixels method is:</p> |
| 347 | |
| 348 | <pre class="text"> |
| 349 | const Quantum *GetImageViewVirtualPixels(const ImageView *image_view) |
| 350 | </pre> |
| 351 | |
| 352 | <p>A description of each parameter follows:</p> |
| 353 | |
| 354 | <dd> |
| 355 | </dd> |
| 356 | |
| 357 | <dd> </dd> |
| 358 | <dl class="dl-horizontal"> |
| 359 | <dt>image_view</dt> |
| 360 | <dd>the image view. </dd> |
| 361 | |
| 362 | <dd> </dd> |
| 363 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 364 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="IsImageView">IsImageView</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 365 | |
| 366 | <p>IsImageView() returns MagickTrue if the the parameter is verified as a image view object.</p> |
| 367 | |
| 368 | <p>The format of the IsImageView method is:</p> |
| 369 | |
| 370 | <pre class="text"> |
| 371 | MagickBooleanType IsImageView(const ImageView *image_view) |
| 372 | </pre> |
| 373 | |
| 374 | <p>A description of each parameter follows:</p> |
| 375 | |
| 376 | <dd> |
| 377 | </dd> |
| 378 | |
| 379 | <dd> </dd> |
| 380 | <dl class="dl-horizontal"> |
| 381 | <dt>image_view</dt> |
| 382 | <dd>the image view. </dd> |
| 383 | |
| 384 | <dd> </dd> |
| 385 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 386 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageView">NewImageView</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 387 | |
| 388 | <p>NewImageView() returns a image view required for all other methods in the Image View API.</p> |
| 389 | |
| 390 | <p>The format of the NewImageView method is:</p> |
| 391 | |
| 392 | <pre class="text"> |
| 393 | ImageView *NewImageView(MagickCore *wand,ExceptionInfo *exception) |
| 394 | </pre> |
| 395 | |
| 396 | <p>A description of each parameter follows:</p> |
| 397 | |
| 398 | <dd> |
| 399 | </dd> |
| 400 | |
| 401 | <dd> </dd> |
| 402 | <dl class="dl-horizontal"> |
| 403 | <dt>image</dt> |
| 404 | <dd>the image. </dd> |
| 405 | |
| 406 | <dd> </dd> |
| 407 | <dt>exception</dt> |
| 408 | <dd>return any errors or warnings in this structure. </dd> |
| 409 | |
| 410 | <dd> </dd> |
| 411 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 412 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="NewImageViewRegion">NewImageViewRegion</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 413 | |
| 414 | <p>NewImageViewRegion() returns a image view required for all other methods in the Image View API.</p> |
| 415 | |
| 416 | <p>The format of the NewImageViewRegion method is:</p> |
| 417 | |
| 418 | <pre class="text"> |
| 419 | ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x, |
| 420 | const ssize_t y,const size_t width,const size_t height, |
| 421 | ExceptionInfo *exception) |
| 422 | </pre> |
| 423 | |
| 424 | <p>A description of each parameter follows:</p> |
| 425 | |
| 426 | <dd> |
| 427 | </dd> |
| 428 | |
| 429 | <dd> </dd> |
| 430 | <dl class="dl-horizontal"> |
| 431 | <dt>wand</dt> |
| 432 | <dd>the magick wand. </dd> |
| 433 | |
| 434 | <dd> </dd> |
| 435 | <dt>x,y,columns,rows</dt> |
| 436 | <dd> These values define the perimeter of a extent of pixel_wands view. </dd> |
| 437 | |
| 438 | <dd> </dd> |
| 439 | <dt>exception</dt> |
| 440 | <dd>return any errors or warnings in this structure. </dd> |
| 441 | |
| 442 | <dd> </dd> |
| 443 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 444 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewDescription">SetImageViewDescription</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 445 | |
| 446 | <p>SetImageViewDescription() associates a description with an image view.</p> |
| 447 | |
| 448 | <p>The format of the SetImageViewDescription method is:</p> |
| 449 | |
| 450 | <pre class="text"> |
| 451 | void SetImageViewDescription(ImageView *image_view, |
| 452 | const char *description) |
| 453 | </pre> |
| 454 | |
| 455 | <p>A description of each parameter follows:</p> |
| 456 | |
| 457 | <dd> |
| 458 | </dd> |
| 459 | |
| 460 | <dd> </dd> |
| 461 | <dl class="dl-horizontal"> |
| 462 | <dt>image_view</dt> |
| 463 | <dd>the image view. </dd> |
| 464 | |
| 465 | <dd> </dd> |
| 466 | <dt>description</dt> |
| 467 | <dd>the image view description. </dd> |
| 468 | |
| 469 | <dd> </dd> |
| 470 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 471 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="SetImageViewIterator">SetImageViewIterator</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 472 | |
| 473 | <p>SetImageViewIterator() iterates over the image view in parallel and calls your set method for each scanline of the view. The pixel extent 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> |
| 474 | |
| 475 | <p>The callback signature is:</p> |
| 476 | |
| 477 | <pre class="text"> |
| 478 | MagickBooleanType SetImageViewMethod(ImageView *destination, |
| 479 | const ssize_t y,const int thread_id,void *context) |
| 480 | </pre> |
| 481 | |
| 482 | <p>Use this pragma if the view is not single threaded:</p> |
| 483 | |
| 484 | <pre class="text"> |
| 485 | #pragma omp critical |
| 486 | </pre> |
| 487 | |
| 488 | <p>to define a section of code in your callback set method that must be executed by a single thread at a time.</p> |
| 489 | |
| 490 | <p>The format of the SetImageViewIterator method is:</p> |
| 491 | |
| 492 | <pre class="text"> |
| 493 | MagickBooleanType SetImageViewIterator(ImageView *destination, |
| 494 | SetImageViewMethod set,void *context) |
| 495 | </pre> |
| 496 | |
| 497 | <p>A description of each parameter follows:</p> |
| 498 | |
| 499 | <dd> |
| 500 | </dd> |
| 501 | |
| 502 | <dd> </dd> |
| 503 | <dl class="dl-horizontal"> |
| 504 | <dt>destination</dt> |
| 505 | <dd>the image view. </dd> |
| 506 | |
| 507 | <dd> </dd> |
| 508 | <dt>set</dt> |
| 509 | <dd>the set callback method. </dd> |
| 510 | |
| 511 | <dd> </dd> |
| 512 | <dt>context</dt> |
| 513 | <dd>the user defined context. </dd> |
| 514 | |
| 515 | <dd> </dd> |
| 516 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 517 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="TransferImageViewIterator">TransferImageViewIterator</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 518 | |
| 519 | <p>TransferImageViewIterator() iterates over two image views in parallel and calls your transfer method for each scanline of the view. The source pixel extent 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 image view is confined to the image canvas-- that is no negative offsets or widths or heights that exceed the image dimension are permitted.</p> |
| 520 | |
| 521 | <p>The callback signature is:</p> |
| 522 | |
| 523 | <pre class="text"> |
| 524 | MagickBooleanType TransferImageViewMethod(const ImageView *source, |
| 525 | ImageView *destination,const ssize_t y,const int thread_id, |
| 526 | void *context) |
| 527 | </pre> |
| 528 | |
| 529 | <p>Use this pragma if the view is not single threaded:</p> |
| 530 | |
| 531 | <pre class="text"> |
| 532 | #pragma omp critical |
| 533 | </pre> |
| 534 | |
| 535 | <p>to define a section of code in your callback transfer method that must be executed by a single thread at a time.</p> |
| 536 | |
| 537 | <p>The format of the TransferImageViewIterator method is:</p> |
| 538 | |
| 539 | <pre class="text"> |
| 540 | MagickBooleanType TransferImageViewIterator(ImageView *source, |
| 541 | ImageView *destination,TransferImageViewMethod transfer,void *context) |
| 542 | </pre> |
| 543 | |
| 544 | <p>A description of each parameter follows:</p> |
| 545 | |
| 546 | <dd> |
| 547 | </dd> |
| 548 | |
| 549 | <dd> </dd> |
| 550 | <dl class="dl-horizontal"> |
| 551 | <dt>source</dt> |
| 552 | <dd>the source image view. </dd> |
| 553 | |
| 554 | <dd> </dd> |
| 555 | <dt>destination</dt> |
| 556 | <dd>the destination image view. </dd> |
| 557 | |
| 558 | <dd> </dd> |
| 559 | <dt>transfer</dt> |
| 560 | <dd>the transfer callback method. </dd> |
| 561 | |
| 562 | <dd> </dd> |
| 563 | <dt>context</dt> |
| 564 | <dd>the user defined context. </dd> |
| 565 | |
| 566 | <dd> </dd> |
| 567 | </dl> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 568 | <h2><a href="http://www.imagemagick.org/api/MagickCore/image-view_8c.html" id="UpdateImageViewIterator">UpdateImageViewIterator</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 569 | |
| 570 | <p>UpdateImageViewIterator() iterates over the image view in parallel and calls your update method for each scanline of the view. The pixel extent 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> |
| 571 | |
| 572 | <p>The callback signature is:</p> |
| 573 | |
| 574 | <pre class="text"> |
| 575 | MagickBooleanType UpdateImageViewMethod(ImageView *source, |
| 576 | const ssize_t y,const int thread_id,void *context) |
| 577 | </pre> |
| 578 | |
| 579 | <p>Use this pragma if the view is not single threaded:</p> |
| 580 | |
| 581 | <pre class="text"> |
| 582 | #pragma omp critical |
| 583 | </pre> |
| 584 | |
| 585 | <p>to define a section of code in your callback update method that must be executed by a single thread at a time.</p> |
| 586 | |
| 587 | <p>The format of the UpdateImageViewIterator method is:</p> |
| 588 | |
| 589 | <pre class="text"> |
| 590 | MagickBooleanType UpdateImageViewIterator(ImageView *source, |
| 591 | UpdateImageViewMethod update,void *context) |
| 592 | </pre> |
| 593 | |
| 594 | <p>A description of each parameter follows:</p> |
| 595 | |
| 596 | <dd> |
| 597 | </dd> |
| 598 | |
| 599 | <dd> </dd> |
| 600 | <dl class="dl-horizontal"> |
| 601 | <dt>source</dt> |
| 602 | <dd>the source image view. </dd> |
| 603 | |
| 604 | <dd> </dd> |
| 605 | <dt>update</dt> |
| 606 | <dd>the update callback method. </dd> |
| 607 | |
| 608 | <dd> </dd> |
| 609 | <dt>context</dt> |
| 610 | <dd>the user defined context. </dd> |
| 611 | |
| 612 | <dd> </dd> |
| 613 | </dl> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 614 | </div> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 615 | <footer class="magick-footer"> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 616 | <p><a href="../support.html">Donate</a> • |
| 617 | <a href="../sitemap.html">Sitemap</a> • |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 618 | <a href="../links.html">Related</a> • |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 619 | <a href="../architecture.html">Architecture</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 620 | </p> |
| 621 | <p><a href="image-view.html#">Back to top</a> • |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 622 | <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 623 | <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p> |
Cristy | ce4a355 | 2015-12-14 13:53:35 -0500 | [diff] [blame] | 624 | <p><small>© 1999-2015 ImageMagick Studio LLC</small></p> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 625 | </footer> |
| 626 | </div><!-- /.container --> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 627 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 628 | <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 629 | <script src="http://nextgen.imagemagick.org/js/magick.html"></script> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame] | 630 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 631 | </body> |
cristy | 5a367e4 | 2015-05-05 12:39:18 +0000 | [diff] [blame] | 632 | </html> |