cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 | % % |
| 4 | % % |
| 5 | % % |
| 6 | % CCCC AAA CCCC H H EEEEE % |
| 7 | % C A A C H H E % |
| 8 | % C AAAAA C HHHHH EEE % |
| 9 | % C A A C H H E % |
| 10 | % CCCC A A CCCC H H EEEEE % |
| 11 | % % |
| 12 | % V V IIIII EEEEE W W % |
| 13 | % V V I E W W % |
| 14 | % V V I EEE W W W % |
| 15 | % V V I E WW WW % |
| 16 | % V IIIII EEEEE W W % |
| 17 | % % |
| 18 | % % |
| 19 | % MagickCore Cache View Methods % |
| 20 | % % |
| 21 | % Software Design % |
| 22 | % John Cristy % |
| 23 | % February 2000 % |
| 24 | % % |
| 25 | % % |
cristy | 1454be7 | 2011-12-19 01:52:48 +0000 | [diff] [blame] | 26 | % Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 27 | % dedicated to making software imaging solutions freely available. % |
| 28 | % % |
| 29 | % You may not use this file except in compliance with the License. You may % |
| 30 | % obtain a copy of the License at % |
| 31 | % % |
| 32 | % http://www.imagemagick.org/script/license.php % |
| 33 | % % |
| 34 | % Unless required by applicable law or agreed to in writing, software % |
| 35 | % distributed under the License is distributed on an "AS IS" BASIS, % |
| 36 | % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % |
| 37 | % See the License for the specific language governing permissions and % |
| 38 | % limitations under the License. % |
| 39 | % % |
| 40 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 41 | % |
| 42 | % |
| 43 | % |
| 44 | */ |
| 45 | |
| 46 | /* |
| 47 | Include declarations. |
| 48 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 49 | #include "MagickCore/studio.h" |
| 50 | #include "MagickCore/cache.h" |
| 51 | #include "MagickCore/cache-private.h" |
| 52 | #include "MagickCore/cache-view.h" |
| 53 | #include "MagickCore/memory_.h" |
| 54 | #include "MagickCore/exception.h" |
| 55 | #include "MagickCore/exception-private.h" |
| 56 | #include "MagickCore/pixel-accessor.h" |
| 57 | #include "MagickCore/string_.h" |
| 58 | #include "MagickCore/thread-private.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 59 | |
| 60 | /* |
| 61 | Typedef declarations. |
| 62 | */ |
| 63 | struct _CacheView |
| 64 | { |
| 65 | Image |
| 66 | *image; |
| 67 | |
| 68 | VirtualPixelMethod |
| 69 | virtual_pixel_method; |
| 70 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 71 | size_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 72 | number_threads; |
| 73 | |
| 74 | NexusInfo |
| 75 | **nexus_info; |
| 76 | |
| 77 | MagickBooleanType |
| 78 | debug; |
| 79 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 80 | size_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 81 | signature; |
| 82 | }; |
| 83 | |
| 84 | /* |
| 85 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 86 | % % |
| 87 | % % |
| 88 | % % |
cristy | db07095 | 2012-04-20 14:33:00 +0000 | [diff] [blame^] | 89 | % A c q u i r e A u t h e n t i c C a c h e V i e w % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 90 | % % |
| 91 | % % |
| 92 | % % |
| 93 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 94 | % |
cristy | db07095 | 2012-04-20 14:33:00 +0000 | [diff] [blame^] | 95 | % AcquireAuthenticCacheView() acquires an authentic view into the pixel cache. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 96 | % |
cristy | db07095 | 2012-04-20 14:33:00 +0000 | [diff] [blame^] | 97 | % The format of the AcquireAuthenticCacheView method is: |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 98 | % |
cristy | db07095 | 2012-04-20 14:33:00 +0000 | [diff] [blame^] | 99 | % CacheView *AcquireAuthenticCacheView(const Image *image, |
| 100 | % ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 101 | % |
| 102 | % A description of each parameter follows: |
| 103 | % |
| 104 | % o image: the image. |
| 105 | % |
cristy | db07095 | 2012-04-20 14:33:00 +0000 | [diff] [blame^] | 106 | % o exception: return any errors or warnings in this structure. |
| 107 | % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 108 | */ |
cristy | db07095 | 2012-04-20 14:33:00 +0000 | [diff] [blame^] | 109 | MagickExport CacheView *AcquireAuthenticCacheView(const Image *image, |
| 110 | ExceptionInfo *exception) |
| 111 | { |
| 112 | CacheView |
| 113 | *cache_view; |
| 114 | |
| 115 | MagickBooleanType |
| 116 | status; |
| 117 | |
| 118 | cache_view=AcquireVirtualCacheView(image,exception); |
| 119 | status=SyncImagePixelCache(cache_view->image,exception); |
| 120 | if (status == MagickFalse) |
| 121 | ThrowFatalException(CacheFatalError,"UnableToAcquireCacheView"); |
| 122 | return(cache_view); |
| 123 | } |
| 124 | |
| 125 | /* |
| 126 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 127 | % % |
| 128 | % % |
| 129 | % % |
| 130 | % A c q u i r e V i r t u a l C a c h e V i e w % |
| 131 | % % |
| 132 | % % |
| 133 | % % |
| 134 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 135 | % |
| 136 | % AcquireVirtualCacheView() acquires a virtual view into the pixel cache, |
| 137 | % using the VirtualPixelMethod that is defined within the given image itself. |
| 138 | % |
| 139 | % The format of the AcquireVirtualCacheView method is: |
| 140 | % |
| 141 | % CacheView *AcquireVirtualCacheView(const Image *image, |
| 142 | % ExceptionInfo *exception) |
| 143 | % |
| 144 | % A description of each parameter follows: |
| 145 | % |
| 146 | % o image: the image. |
| 147 | % |
| 148 | % o exception: return any errors or warnings in this structure. |
| 149 | % |
| 150 | */ |
| 151 | MagickExport CacheView *AcquireVirtualCacheView(const Image *image, |
| 152 | ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 153 | { |
| 154 | CacheView |
| 155 | *cache_view; |
| 156 | |
| 157 | assert(image != (Image *) NULL); |
| 158 | assert(image->signature == MagickSignature); |
| 159 | if (image->debug != MagickFalse) |
| 160 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); |
cristy | db07095 | 2012-04-20 14:33:00 +0000 | [diff] [blame^] | 161 | (void) exception; |
cristy | a64b85d | 2011-09-14 01:02:31 +0000 | [diff] [blame] | 162 | cache_view=(CacheView *) AcquireQuantumMemory(1,sizeof(*cache_view)); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 163 | if (cache_view == (CacheView *) NULL) |
| 164 | ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); |
| 165 | (void) ResetMagickMemory(cache_view,0,sizeof(*cache_view)); |
| 166 | cache_view->image=ReferenceImage((Image *) image); |
| 167 | cache_view->number_threads=GetOpenMPMaximumThreads(); |
| 168 | cache_view->nexus_info=AcquirePixelCacheNexus(cache_view->number_threads); |
| 169 | cache_view->virtual_pixel_method=GetImageVirtualPixelMethod(image); |
| 170 | cache_view->debug=IsEventLogging(); |
| 171 | cache_view->signature=MagickSignature; |
| 172 | if (cache_view->nexus_info == (NexusInfo **) NULL) |
| 173 | ThrowFatalException(CacheFatalError,"UnableToAcquireCacheView"); |
| 174 | return(cache_view); |
| 175 | } |
| 176 | |
| 177 | /* |
| 178 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 179 | % % |
| 180 | % % |
| 181 | % % |
| 182 | % C l o n e C a c h e V i e w % |
| 183 | % % |
| 184 | % % |
| 185 | % % |
| 186 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 187 | % |
| 188 | % CloneCacheView() makes an exact copy of the specified cache view. |
| 189 | % |
| 190 | % The format of the CloneCacheView method is: |
| 191 | % |
| 192 | % CacheView *CloneCacheView(const CacheView *cache_view) |
| 193 | % |
| 194 | % A description of each parameter follows: |
| 195 | % |
| 196 | % o cache_view: the cache view. |
| 197 | % |
| 198 | */ |
| 199 | MagickExport CacheView *CloneCacheView(const CacheView *cache_view) |
| 200 | { |
| 201 | CacheView |
| 202 | *clone_view; |
| 203 | |
| 204 | assert(cache_view != (CacheView *) NULL); |
| 205 | assert(cache_view->signature == MagickSignature); |
| 206 | if (cache_view->debug != MagickFalse) |
| 207 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 208 | cache_view->image->filename); |
cristy | a64b85d | 2011-09-14 01:02:31 +0000 | [diff] [blame] | 209 | clone_view=(CacheView *) AcquireQuantumMemory(1,sizeof(*clone_view)); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 210 | if (clone_view == (CacheView *) NULL) |
| 211 | ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); |
| 212 | (void) ResetMagickMemory(clone_view,0,sizeof(*clone_view)); |
| 213 | clone_view->image=ReferenceImage(cache_view->image); |
| 214 | clone_view->number_threads=cache_view->number_threads; |
| 215 | clone_view->nexus_info=AcquirePixelCacheNexus(cache_view->number_threads); |
| 216 | clone_view->virtual_pixel_method=cache_view->virtual_pixel_method; |
| 217 | clone_view->debug=cache_view->debug; |
| 218 | clone_view->signature=MagickSignature; |
| 219 | return(clone_view); |
| 220 | } |
| 221 | |
| 222 | /* |
| 223 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 224 | % % |
| 225 | % % |
| 226 | % % |
| 227 | % D e s t r o y C a c h e V i e w % |
| 228 | % % |
| 229 | % % |
| 230 | % % |
| 231 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 232 | % |
| 233 | % DestroyCacheView() destroys the specified view returned by a previous call |
| 234 | % to AcquireCacheView(). |
| 235 | % |
| 236 | % The format of the DestroyCacheView method is: |
| 237 | % |
| 238 | % CacheView *DestroyCacheView(CacheView *cache_view) |
| 239 | % |
| 240 | % A description of each parameter follows: |
| 241 | % |
| 242 | % o cache_view: the cache view. |
| 243 | % |
| 244 | */ |
| 245 | MagickExport CacheView *DestroyCacheView(CacheView *cache_view) |
| 246 | { |
| 247 | assert(cache_view != (CacheView *) NULL); |
| 248 | assert(cache_view->signature == MagickSignature); |
| 249 | if (cache_view->debug != MagickFalse) |
| 250 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 251 | cache_view->image->filename); |
| 252 | if (cache_view->nexus_info != (NexusInfo **) NULL) |
| 253 | cache_view->nexus_info=DestroyPixelCacheNexus(cache_view->nexus_info, |
| 254 | cache_view->number_threads); |
| 255 | cache_view->image=DestroyImage(cache_view->image); |
| 256 | cache_view->signature=(~MagickSignature); |
cristy | b41ee10 | 2010-10-04 16:46:15 +0000 | [diff] [blame] | 257 | cache_view=(CacheView *) RelinquishMagickMemory(cache_view); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 258 | return(cache_view); |
| 259 | } |
| 260 | |
| 261 | /* |
| 262 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 263 | % % |
| 264 | % % |
| 265 | % % |
| 266 | % G e t C a c h e V i e w C o l o r s p a c e % |
| 267 | % % |
| 268 | % % |
| 269 | % % |
| 270 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 271 | % |
| 272 | % GetCacheViewColorspace() returns the image colorspace associated with the |
| 273 | % specified view. |
| 274 | % |
| 275 | % The format of the GetCacheViewColorspace method is: |
| 276 | % |
| 277 | % ColorspaceType GetCacheViewColorspace(const CacheView *cache_view) |
| 278 | % |
| 279 | % A description of each parameter follows: |
| 280 | % |
| 281 | % o cache_view: the cache view. |
| 282 | % |
| 283 | */ |
| 284 | MagickExport ColorspaceType GetCacheViewColorspace(const CacheView *cache_view) |
| 285 | { |
| 286 | assert(cache_view != (CacheView *) NULL); |
| 287 | assert(cache_view->signature == MagickSignature); |
| 288 | if (cache_view->debug != MagickFalse) |
| 289 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 290 | cache_view->image->filename); |
cristy | 0d26717 | 2011-04-25 20:13:48 +0000 | [diff] [blame] | 291 | return(GetPixelCacheColorspace(cache_view->image->cache)); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 292 | } |
| 293 | |
| 294 | /* |
| 295 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 296 | % % |
| 297 | % % |
| 298 | % % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 299 | + G e t C a c h e V i e w E x t e n t % |
| 300 | % % |
| 301 | % % |
| 302 | % % |
| 303 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 304 | % |
| 305 | % GetCacheViewExtent() returns the extent of the pixels associated with the |
| 306 | % last call to QueueCacheViewAuthenticPixels() or |
| 307 | % GetCacheViewAuthenticPixels(). |
| 308 | % |
| 309 | % The format of the GetCacheViewExtent() method is: |
| 310 | % |
| 311 | % MagickSizeType GetCacheViewExtent(const CacheView *cache_view) |
| 312 | % |
| 313 | % A description of each parameter follows: |
| 314 | % |
| 315 | % o cache_view: the cache view. |
| 316 | % |
| 317 | */ |
| 318 | MagickExport MagickSizeType GetCacheViewExtent(const CacheView *cache_view) |
| 319 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 320 | const int |
| 321 | id = GetOpenMPThreadId(); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 322 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 323 | MagickSizeType |
| 324 | extent; |
| 325 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 326 | assert(cache_view != (CacheView *) NULL); |
| 327 | assert(cache_view->signature == MagickSignature); |
| 328 | if (cache_view->debug != MagickFalse) |
| 329 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 330 | cache_view->image->filename); |
| 331 | assert(cache_view->image->cache != (Cache) NULL); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 332 | assert(id < (int) cache_view->number_threads); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 333 | extent=GetPixelCacheNexusExtent(cache_view->image->cache, |
| 334 | cache_view->nexus_info[id]); |
| 335 | return(extent); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 336 | } |
| 337 | |
| 338 | /* |
| 339 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 340 | % % |
| 341 | % % |
| 342 | % % |
| 343 | % G e t C a c h e V i e w S t o r a g e C l a s s % |
| 344 | % % |
| 345 | % % |
| 346 | % % |
| 347 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 348 | % |
| 349 | % GetCacheViewStorageClass() returns the image storage class associated with |
| 350 | % the specified view. |
| 351 | % |
| 352 | % The format of the GetCacheViewStorageClass method is: |
| 353 | % |
| 354 | % ClassType GetCacheViewStorageClass(const CacheView *cache_view) |
| 355 | % |
| 356 | % A description of each parameter follows: |
| 357 | % |
| 358 | % o cache_view: the cache view. |
| 359 | % |
| 360 | */ |
| 361 | MagickExport ClassType GetCacheViewStorageClass(const CacheView *cache_view) |
| 362 | { |
| 363 | assert(cache_view != (CacheView *) NULL); |
| 364 | assert(cache_view->signature == MagickSignature); |
| 365 | if (cache_view->debug != MagickFalse) |
| 366 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 367 | cache_view->image->filename); |
cristy | 0d26717 | 2011-04-25 20:13:48 +0000 | [diff] [blame] | 368 | return(GetPixelCacheStorageClass(cache_view->image->cache)); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 369 | } |
| 370 | |
| 371 | /* |
| 372 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 373 | % % |
| 374 | % % |
| 375 | % % |
| 376 | % G e t C a c h e V i e w A u t h e n t i c P i x e l s % |
| 377 | % % |
| 378 | % % |
| 379 | % % |
| 380 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 381 | % |
| 382 | % GetCacheViewAuthenticPixels() gets pixels from the in-memory or disk pixel |
| 383 | % cache as defined by the geometry parameters. A pointer to the pixels is |
| 384 | % returned if the pixels are transferred, otherwise a NULL is returned. |
| 385 | % |
| 386 | % The format of the GetCacheViewAuthenticPixels method is: |
| 387 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 388 | % Quantum *GetCacheViewAuthenticPixels(CacheView *cache_view, |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 389 | % const ssize_t x,const ssize_t y,const size_t columns, |
| 390 | % const size_t rows,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 391 | % |
| 392 | % A description of each parameter follows: |
| 393 | % |
| 394 | % o cache_view: the cache view. |
| 395 | % |
| 396 | % o x,y,columns,rows: These values define the perimeter of a region of |
| 397 | % pixels. |
| 398 | % |
cristy | db07095 | 2012-04-20 14:33:00 +0000 | [diff] [blame^] | 399 | % o exception: return any errors or warnings in this structure. |
| 400 | % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 401 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 402 | MagickExport Quantum *GetCacheViewAuthenticPixels(CacheView *cache_view, |
cristy | 3009723 | 2010-07-01 02:16:30 +0000 | [diff] [blame] | 403 | const ssize_t x,const ssize_t y,const size_t columns,const size_t rows, |
| 404 | ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 405 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 406 | const int |
| 407 | id = GetOpenMPThreadId(); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 408 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 409 | Quantum |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 410 | *pixels; |
| 411 | |
| 412 | assert(cache_view != (CacheView *) NULL); |
| 413 | assert(cache_view->signature == MagickSignature); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 414 | assert(id < (int) cache_view->number_threads); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 415 | pixels=GetAuthenticPixelCacheNexus(cache_view->image,x,y,columns,rows, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 416 | cache_view->nexus_info[id],exception); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 417 | return(pixels); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 418 | } |
| 419 | |
| 420 | /* |
| 421 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 422 | % % |
| 423 | % % |
| 424 | % % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 425 | % G e t C a c h e V i e w A u t h e n t i c M e t a c o n t e n t % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 426 | % % |
| 427 | % % |
| 428 | % % |
| 429 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 430 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 431 | % GetCacheViewAuthenticMetacontent() returns the meta-content corresponding |
| 432 | % with the last call to SetCacheViewIndexes() or |
| 433 | % GetCacheViewAuthenticMetacontent(). The meta-content are authentic and can |
| 434 | % be updated. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 435 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 436 | % The format of the GetCacheViewAuthenticMetacontent() method is: |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 437 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 438 | % void *GetCacheViewAuthenticMetacontent(CacheView *cache_view) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 439 | % |
| 440 | % A description of each parameter follows: |
| 441 | % |
| 442 | % o cache_view: the cache view. |
| 443 | % |
| 444 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 445 | MagickExport void *GetCacheViewAuthenticMetacontent( |
| 446 | CacheView *cache_view) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 447 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 448 | const int |
| 449 | id = GetOpenMPThreadId(); |
| 450 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 451 | void |
| 452 | *metacontent; |
| 453 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 454 | assert(cache_view != (CacheView *) NULL); |
| 455 | assert(cache_view->signature == MagickSignature); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 456 | assert(cache_view->image->cache != (Cache) NULL); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 457 | assert(id < (int) cache_view->number_threads); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 458 | metacontent=GetPixelCacheNexusMetacontent(cache_view->image->cache, |
| 459 | cache_view->nexus_info[id]); |
| 460 | return(metacontent); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 461 | } |
| 462 | |
| 463 | /* |
| 464 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 465 | % % |
| 466 | % % |
| 467 | % % |
| 468 | % G e t C a c h e V i e w A u t h e n t i c P i x e l Q u e u e % |
| 469 | % % |
| 470 | % % |
| 471 | % % |
| 472 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 473 | % |
| 474 | % GetCacheViewAuthenticPixelQueue() returns the pixels associated with the |
| 475 | % last call to QueueCacheViewAuthenticPixels() or |
| 476 | % GetCacheViewAuthenticPixels(). The pixels are authentic and therefore can be |
| 477 | % updated. |
| 478 | % |
| 479 | % The format of the GetCacheViewAuthenticPixelQueue() method is: |
| 480 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 481 | % Quantum *GetCacheViewAuthenticPixelQueue(CacheView *cache_view) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 482 | % |
| 483 | % A description of each parameter follows: |
| 484 | % |
| 485 | % o cache_view: the cache view. |
| 486 | % |
| 487 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 488 | MagickExport Quantum *GetCacheViewAuthenticPixelQueue(CacheView *cache_view) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 489 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 490 | const int |
| 491 | id = GetOpenMPThreadId(); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 492 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 493 | Quantum |
| 494 | *pixels; |
| 495 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 496 | assert(cache_view != (CacheView *) NULL); |
| 497 | assert(cache_view->signature == MagickSignature); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 498 | assert(cache_view->image->cache != (Cache) NULL); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 499 | assert(id < (int) cache_view->number_threads); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 500 | pixels=GetPixelCacheNexusPixels(cache_view->image->cache, |
| 501 | cache_view->nexus_info[id]); |
| 502 | return(pixels); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 503 | } |
| 504 | |
| 505 | /* |
| 506 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 507 | % % |
| 508 | % % |
| 509 | % % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 510 | % G e t C a c h e V i e w V i r t u a l M e t a c o n t e n t % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 511 | % % |
| 512 | % % |
| 513 | % % |
| 514 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 515 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 516 | % GetCacheViewVirtualMetacontent() returns the meta-content corresponding |
| 517 | % with the last call to GetCacheViewVirtualMetacontent(). The meta-content |
| 518 | % is virtual and therefore cannot be updated. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 519 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 520 | % The format of the GetCacheViewVirtualMetacontent() method is: |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 521 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 522 | % const void *GetCacheViewVirtualMetacontent( |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 523 | % const CacheView *cache_view) |
| 524 | % |
| 525 | % A description of each parameter follows: |
| 526 | % |
| 527 | % o cache_view: the cache view. |
| 528 | % |
| 529 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 530 | MagickExport const void *GetCacheViewVirtualMetacontent( |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 531 | const CacheView *cache_view) |
| 532 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 533 | const int |
| 534 | id = GetOpenMPThreadId(); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 535 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 536 | const void |
| 537 | *metacontent; |
| 538 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 539 | assert(cache_view != (const CacheView *) NULL); |
| 540 | assert(cache_view->signature == MagickSignature); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 541 | assert(cache_view->image->cache != (Cache) NULL); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 542 | assert(id < (int) cache_view->number_threads); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 543 | metacontent=GetVirtualMetacontentFromNexus(cache_view->image->cache, |
| 544 | cache_view->nexus_info[id]); |
| 545 | return(metacontent); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 546 | } |
| 547 | |
| 548 | /* |
| 549 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 550 | % % |
| 551 | % % |
| 552 | % % |
| 553 | % G e t C a c h e V i e w V i r t u a l P i x e l Q u e u e % |
| 554 | % % |
| 555 | % % |
| 556 | % % |
| 557 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 558 | % |
| 559 | % GetCacheViewVirtualPixelQueue() returns the the pixels associated with |
| 560 | % the last call to GetCacheViewVirtualPixels(). The pixels are virtual |
| 561 | % and therefore cannot be updated. |
| 562 | % |
| 563 | % The format of the GetCacheViewVirtualPixelQueue() method is: |
| 564 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 565 | % const Quantum *GetCacheViewVirtualPixelQueue( |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 566 | % const CacheView *cache_view) |
| 567 | % |
| 568 | % A description of each parameter follows: |
| 569 | % |
| 570 | % o cache_view: the cache view. |
| 571 | % |
| 572 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 573 | MagickExport const Quantum *GetCacheViewVirtualPixelQueue( |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 574 | const CacheView *cache_view) |
| 575 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 576 | const int |
| 577 | id = GetOpenMPThreadId(); |
| 578 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 579 | const Quantum |
| 580 | *pixels; |
| 581 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 582 | assert(cache_view != (const CacheView *) NULL); |
| 583 | assert(cache_view->signature == MagickSignature); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 584 | assert(cache_view->image->cache != (Cache) NULL); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 585 | assert(id < (int) cache_view->number_threads); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 586 | pixels=GetVirtualPixelsNexus(cache_view->image->cache, |
| 587 | cache_view->nexus_info[id]); |
| 588 | return(pixels); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 589 | } |
| 590 | |
| 591 | /* |
| 592 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 593 | % % |
| 594 | % % |
| 595 | % % |
| 596 | % G e t C a c h e V i e w V i r t u a l P i x e l s % |
| 597 | % % |
| 598 | % % |
| 599 | % % |
| 600 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 601 | % |
| 602 | % GetCacheViewVirtualPixels() gets virtual pixels from the in-memory or |
| 603 | % disk pixel cache as defined by the geometry parameters. A pointer to the |
| 604 | % pixels is returned if the pixels are transferred, otherwise a NULL is |
| 605 | % returned. |
| 606 | % |
| 607 | % The format of the GetCacheViewVirtualPixels method is: |
| 608 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 609 | % const Quantum *GetCacheViewVirtualPixels( |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 610 | % const CacheView *cache_view,const ssize_t x,const ssize_t y, |
cristy | e076a6e | 2010-08-15 19:59:43 +0000 | [diff] [blame] | 611 | % const size_t columns,const size_t rows,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 612 | % |
| 613 | % A description of each parameter follows: |
| 614 | % |
| 615 | % o cache_view: the cache view. |
| 616 | % |
| 617 | % o x,y,columns,rows: These values define the perimeter of a region of |
| 618 | % pixels. |
| 619 | % |
| 620 | % o exception: return any errors or warnings in this structure. |
| 621 | % |
| 622 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 623 | MagickExport const Quantum *GetCacheViewVirtualPixels( |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 624 | const CacheView *cache_view,const ssize_t x,const ssize_t y, |
| 625 | const size_t columns,const size_t rows,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 626 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 627 | const int |
| 628 | id = GetOpenMPThreadId(); |
| 629 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 630 | const Quantum |
| 631 | *pixels; |
| 632 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 633 | assert(cache_view != (CacheView *) NULL); |
| 634 | assert(cache_view->signature == MagickSignature); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 635 | assert(id < (int) cache_view->number_threads); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 636 | pixels=GetVirtualPixelsFromNexus(cache_view->image, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 637 | cache_view->virtual_pixel_method,x,y,columns,rows, |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 638 | cache_view->nexus_info[id],exception); |
| 639 | return(pixels); |
| 640 | } |
| 641 | |
| 642 | /* |
| 643 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 644 | % % |
| 645 | % % |
| 646 | % % |
| 647 | % G e t O n e C a c h e V i e w A u t h e n t i c P i x e l % |
| 648 | % % |
| 649 | % % |
| 650 | % % |
| 651 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 652 | % |
| 653 | % GetOneCacheViewAuthenticPixel() returns a single pixel at the specified (x,y) |
| 654 | % location. The image background color is returned if an error occurs. |
| 655 | % |
| 656 | % The format of the GetOneCacheViewAuthenticPixel method is: |
| 657 | % |
| 658 | % MagickBooleaNType GetOneCacheViewAuthenticPixel( |
| 659 | % const CacheView *cache_view,const ssize_t x,const ssize_t y, |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 660 | % Quantum *pixel,ExceptionInfo *exception) |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 661 | % |
| 662 | % A description of each parameter follows: |
| 663 | % |
| 664 | % o cache_view: the cache view. |
| 665 | % |
| 666 | % o x,y: These values define the offset of the pixel. |
| 667 | % |
| 668 | % o pixel: return a pixel at the specified (x,y) location. |
| 669 | % |
| 670 | % o exception: return any errors or warnings in this structure. |
| 671 | % |
| 672 | */ |
| 673 | MagickExport MagickBooleanType GetOneCacheViewAuthenticPixel( |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 674 | const CacheView *cache_view,const ssize_t x,const ssize_t y,Quantum *pixel, |
| 675 | ExceptionInfo *exception) |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 676 | { |
| 677 | const int |
| 678 | id = GetOpenMPThreadId(); |
| 679 | |
| 680 | Quantum |
| 681 | *p; |
| 682 | |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 683 | register ssize_t |
| 684 | i; |
| 685 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 686 | assert(cache_view != (CacheView *) NULL); |
| 687 | assert(cache_view->signature == MagickSignature); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 688 | assert(id < (int) cache_view->number_threads); |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 689 | (void) memset(pixel,0,MaxPixelChannels*sizeof(*pixel)); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 690 | p=GetAuthenticPixelCacheNexus(cache_view->image,x,y,1,1, |
| 691 | cache_view->nexus_info[id],exception); |
| 692 | if (p == (const Quantum *) NULL) |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 693 | { |
cristy | d09f880 | 2012-02-04 16:44:10 +0000 | [diff] [blame] | 694 | PixelInfo |
| 695 | background_color; |
| 696 | |
| 697 | background_color=cache_view->image->background_color; |
| 698 | pixel[RedPixelChannel]=ClampToQuantum(background_color.red); |
| 699 | pixel[GreenPixelChannel]=ClampToQuantum(background_color.green); |
| 700 | pixel[BluePixelChannel]=ClampToQuantum(background_color.blue); |
| 701 | pixel[BlackPixelChannel]=ClampToQuantum(background_color.black); |
| 702 | pixel[AlphaPixelChannel]=ClampToQuantum(background_color.alpha); |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 703 | return(MagickFalse); |
| 704 | } |
| 705 | for (i=0; i < (ssize_t) GetPixelChannels(cache_view->image); i++) |
| 706 | { |
| 707 | PixelChannel |
| 708 | channel; |
| 709 | |
cristy | e2a912b | 2011-12-05 20:02:07 +0000 | [diff] [blame] | 710 | channel=GetPixelChannelMapChannel(cache_view->image,i); |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 711 | pixel[channel]=p[i]; |
| 712 | } |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 713 | return(MagickTrue); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 714 | } |
| 715 | |
| 716 | /* |
| 717 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 718 | % % |
| 719 | % % |
| 720 | % % |
| 721 | % G e t O n e C a c h e V i e w V i r t u a l P i x e l % |
| 722 | % % |
| 723 | % % |
| 724 | % % |
| 725 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 726 | % |
| 727 | % GetOneCacheViewVirtualPixel() returns a single pixel at the specified (x,y) |
| 728 | % location. The image background color is returned if an error occurs. If |
| 729 | % you plan to modify the pixel, use GetOneCacheViewAuthenticPixel() instead. |
| 730 | % |
| 731 | % The format of the GetOneCacheViewVirtualPixel method is: |
| 732 | % |
| 733 | % MagickBooleanType GetOneCacheViewVirtualPixel( |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 734 | % const CacheView *cache_view,const ssize_t x,const ssize_t y, |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 735 | % Quantum *pixel,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 736 | % |
| 737 | % A description of each parameter follows: |
| 738 | % |
| 739 | % o cache_view: the cache view. |
| 740 | % |
| 741 | % o x,y: These values define the offset of the pixel. |
| 742 | % |
| 743 | % o pixel: return a pixel at the specified (x,y) location. |
| 744 | % |
| 745 | % o exception: return any errors or warnings in this structure. |
| 746 | % |
| 747 | */ |
| 748 | MagickExport MagickBooleanType GetOneCacheViewVirtualPixel( |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 749 | const CacheView *cache_view,const ssize_t x,const ssize_t y,Quantum *pixel, |
| 750 | ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 751 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 752 | const int |
| 753 | id = GetOpenMPThreadId(); |
| 754 | |
cristy | f05d494 | 2012-03-17 16:26:09 +0000 | [diff] [blame] | 755 | register const Quantum |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 756 | *p; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 757 | |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 758 | register ssize_t |
| 759 | i; |
| 760 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 761 | assert(cache_view != (CacheView *) NULL); |
| 762 | assert(cache_view->signature == MagickSignature); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 763 | assert(id < (int) cache_view->number_threads); |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 764 | (void) memset(pixel,0,MaxPixelChannels*sizeof(*pixel)); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 765 | p=GetVirtualPixelsFromNexus(cache_view->image, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 766 | cache_view->virtual_pixel_method,x,y,1,1,cache_view->nexus_info[id], |
| 767 | exception); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 768 | if (p == (const Quantum *) NULL) |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 769 | { |
cristy | d09f880 | 2012-02-04 16:44:10 +0000 | [diff] [blame] | 770 | PixelInfo |
| 771 | background_color; |
| 772 | |
| 773 | background_color=cache_view->image->background_color; |
| 774 | pixel[RedPixelChannel]=ClampToQuantum(background_color.red); |
| 775 | pixel[GreenPixelChannel]=ClampToQuantum(background_color.green); |
| 776 | pixel[BluePixelChannel]=ClampToQuantum(background_color.blue); |
| 777 | pixel[BlackPixelChannel]=ClampToQuantum(background_color.black); |
| 778 | pixel[AlphaPixelChannel]=ClampToQuantum(background_color.alpha); |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 779 | return(MagickFalse); |
| 780 | } |
| 781 | for (i=0; i < (ssize_t) GetPixelChannels(cache_view->image); i++) |
| 782 | { |
| 783 | PixelChannel |
| 784 | channel; |
| 785 | |
cristy | e2a912b | 2011-12-05 20:02:07 +0000 | [diff] [blame] | 786 | channel=GetPixelChannelMapChannel(cache_view->image,i); |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 787 | pixel[channel]=p[i]; |
| 788 | } |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 789 | return(MagickTrue); |
| 790 | } |
| 791 | |
| 792 | /* |
| 793 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 794 | % % |
| 795 | % % |
| 796 | % % |
cristy | f05d494 | 2012-03-17 16:26:09 +0000 | [diff] [blame] | 797 | % G e t O n e C a c h e V i e w V i r t u a l P i x e l I n f o % |
| 798 | % % |
| 799 | % % |
| 800 | % % |
| 801 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 802 | % |
| 803 | % GetOneCacheViewVirtualPixelInfo() returns a single pixel at the specified |
| 804 | % (x,y) location. The image background color is returned if an error occurs. |
| 805 | % If you plan to modify the pixel, use GetOneCacheViewAuthenticPixel() instead. |
| 806 | % |
| 807 | % The format of the GetOneCacheViewVirtualPixelInfo method is: |
| 808 | % |
| 809 | % MagickBooleanType GetOneCacheViewVirtualPixelInfo( |
| 810 | % const CacheView *cache_view,const ssize_t x,const ssize_t y, |
| 811 | % PixelInfo *pixel,ExceptionInfo *exception) |
| 812 | % |
| 813 | % A description of each parameter follows: |
| 814 | % |
| 815 | % o cache_view: the cache view. |
| 816 | % |
| 817 | % o x,y: These values define the offset of the pixel. |
| 818 | % |
| 819 | % o pixel: return a pixel at the specified (x,y) location. |
| 820 | % |
| 821 | % o exception: return any errors or warnings in this structure. |
| 822 | % |
| 823 | */ |
| 824 | MagickExport MagickBooleanType GetOneCacheViewVirtualPixelInfo( |
| 825 | const CacheView *cache_view,const ssize_t x,const ssize_t y,PixelInfo *pixel, |
| 826 | ExceptionInfo *exception) |
| 827 | { |
| 828 | const int |
| 829 | id = GetOpenMPThreadId(); |
| 830 | |
| 831 | register const Quantum |
| 832 | *p; |
| 833 | |
| 834 | assert(cache_view != (CacheView *) NULL); |
| 835 | assert(cache_view->signature == MagickSignature); |
| 836 | assert(id < (int) cache_view->number_threads); |
cristy | f82cff8 | 2012-04-16 16:54:17 +0000 | [diff] [blame] | 837 | GetPixelInfo(cache_view->image,pixel); |
cristy | f05d494 | 2012-03-17 16:26:09 +0000 | [diff] [blame] | 838 | p=GetVirtualPixelsFromNexus(cache_view->image, |
| 839 | cache_view->virtual_pixel_method,x,y,1,1,cache_view->nexus_info[id], |
| 840 | exception); |
cristy | f05d494 | 2012-03-17 16:26:09 +0000 | [diff] [blame] | 841 | if (p == (const Quantum *) NULL) |
| 842 | return(MagickFalse); |
| 843 | GetPixelInfoPixel(cache_view->image,p,pixel); |
| 844 | return(MagickTrue); |
| 845 | } |
| 846 | |
| 847 | /* |
| 848 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 849 | % % |
| 850 | % % |
| 851 | % % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 852 | % G e t O n e C a c h e V i e w V i r t u a l P i x e l % |
| 853 | % % |
| 854 | % % |
| 855 | % % |
| 856 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 857 | % |
| 858 | % GetOneCacheViewVirtualMethodPixel() returns a single virtual pixel at |
| 859 | % the specified (x,y) location. The image background color is returned if an |
| 860 | % error occurs. If you plan to modify the pixel, use |
| 861 | % GetOneCacheViewAuthenticPixel() instead. |
| 862 | % |
| 863 | % The format of the GetOneCacheViewVirtualPixel method is: |
| 864 | % |
| 865 | % MagickBooleanType GetOneCacheViewVirtualMethodPixel( |
| 866 | % const CacheView *cache_view, |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 867 | % const VirtualPixelMethod virtual_pixel_method,const ssize_t x, |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 868 | % const ssize_t y,Quantum *pixel,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 869 | % |
| 870 | % A description of each parameter follows: |
| 871 | % |
| 872 | % o cache_view: the cache view. |
| 873 | % |
| 874 | % o virtual_pixel_method: the virtual pixel method. |
| 875 | % |
| 876 | % o x,y: These values define the offset of the pixel. |
| 877 | % |
| 878 | % o pixel: return a pixel at the specified (x,y) location. |
| 879 | % |
| 880 | % o exception: return any errors or warnings in this structure. |
| 881 | % |
| 882 | */ |
| 883 | MagickExport MagickBooleanType GetOneCacheViewVirtualMethodPixel( |
| 884 | const CacheView *cache_view,const VirtualPixelMethod virtual_pixel_method, |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 885 | const ssize_t x,const ssize_t y,Quantum *pixel,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 886 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 887 | const int |
| 888 | id = GetOpenMPThreadId(); |
| 889 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 890 | const Quantum |
| 891 | *p; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 892 | |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 893 | register ssize_t |
| 894 | i; |
| 895 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 896 | assert(cache_view != (CacheView *) NULL); |
| 897 | assert(cache_view->signature == MagickSignature); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 898 | assert(id < (int) cache_view->number_threads); |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 899 | (void) memset(pixel,0,MaxPixelChannels*sizeof(*pixel)); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 900 | p=GetVirtualPixelsFromNexus(cache_view->image,virtual_pixel_method,x,y,1,1, |
| 901 | cache_view->nexus_info[id],exception); |
| 902 | if (p == (const Quantum *) NULL) |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 903 | { |
cristy | d09f880 | 2012-02-04 16:44:10 +0000 | [diff] [blame] | 904 | PixelInfo |
| 905 | background_color; |
| 906 | |
| 907 | background_color=cache_view->image->background_color; |
| 908 | pixel[RedPixelChannel]=ClampToQuantum(background_color.red); |
| 909 | pixel[GreenPixelChannel]=ClampToQuantum(background_color.green); |
| 910 | pixel[BluePixelChannel]=ClampToQuantum(background_color.blue); |
| 911 | pixel[BlackPixelChannel]=ClampToQuantum(background_color.black); |
| 912 | pixel[AlphaPixelChannel]=ClampToQuantum(background_color.alpha); |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 913 | return(MagickFalse); |
| 914 | } |
| 915 | for (i=0; i < (ssize_t) GetPixelChannels(cache_view->image); i++) |
| 916 | { |
| 917 | PixelChannel |
| 918 | channel; |
| 919 | |
cristy | e2a912b | 2011-12-05 20:02:07 +0000 | [diff] [blame] | 920 | channel=GetPixelChannelMapChannel(cache_view->image,i); |
cristy | 2ed42f6 | 2011-10-02 19:49:57 +0000 | [diff] [blame] | 921 | pixel[channel]=p[i]; |
| 922 | } |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 923 | return(MagickTrue); |
| 924 | } |
| 925 | |
| 926 | /* |
| 927 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 928 | % % |
| 929 | % % |
| 930 | % % |
| 931 | % Q u e u e C a c h e V i e w A u t h e n t i c P i x e l s % |
| 932 | % % |
| 933 | % % |
| 934 | % % |
| 935 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 936 | % |
| 937 | % QueueCacheViewAuthenticPixels() queues authentic pixels from the in-memory or |
| 938 | % disk pixel cache as defined by the geometry parameters. A pointer to the |
| 939 | % pixels is returned if the pixels are transferred, otherwise a NULL is |
| 940 | % returned. |
| 941 | % |
| 942 | % The format of the QueueCacheViewAuthenticPixels method is: |
| 943 | % |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 944 | % Quantum *QueueCacheViewAuthenticPixels(CacheView *cache_view, |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 945 | % const ssize_t x,const ssize_t y,const size_t columns, |
| 946 | % const size_t rows,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 947 | % |
| 948 | % A description of each parameter follows: |
| 949 | % |
| 950 | % o cache_view: the cache view. |
| 951 | % |
| 952 | % o x,y,columns,rows: These values define the perimeter of a region of |
| 953 | % pixels. |
| 954 | % |
| 955 | % o exception: return any errors or warnings in this structure. |
| 956 | % |
| 957 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 958 | MagickExport Quantum *QueueCacheViewAuthenticPixels(CacheView *cache_view, |
cristy | 3009723 | 2010-07-01 02:16:30 +0000 | [diff] [blame] | 959 | const ssize_t x,const ssize_t y,const size_t columns,const size_t rows, |
| 960 | ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 961 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 962 | const int |
| 963 | id = GetOpenMPThreadId(); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 964 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 965 | Quantum |
| 966 | *pixels; |
| 967 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 968 | assert(cache_view != (CacheView *) NULL); |
| 969 | assert(cache_view->signature == MagickSignature); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 970 | assert(id < (int) cache_view->number_threads); |
cristy | c11dace | 2012-01-24 16:39:46 +0000 | [diff] [blame] | 971 | pixels=QueueAuthenticPixelCacheNexus(cache_view->image,x,y,columns,rows, |
| 972 | MagickFalse,cache_view->nexus_info[id],exception); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 973 | return(pixels); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 974 | } |
| 975 | |
| 976 | /* |
| 977 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 978 | % % |
| 979 | % % |
| 980 | % % |
| 981 | % S e t C a c h e V i e w S t o r a g e C l a s s % |
| 982 | % % |
| 983 | % % |
| 984 | % % |
| 985 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 986 | % |
| 987 | % SetCacheViewStorageClass() sets the image storage class associated with |
| 988 | % the specified view. |
| 989 | % |
| 990 | % The format of the SetCacheViewStorageClass method is: |
| 991 | % |
| 992 | % MagickBooleanType SetCacheViewStorageClass(CacheView *cache_view, |
cristy | c82a27b | 2011-10-21 01:07:16 +0000 | [diff] [blame] | 993 | % const ClassType storage_class,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 994 | % |
| 995 | % A description of each parameter follows: |
| 996 | % |
| 997 | % o cache_view: the cache view. |
| 998 | % |
| 999 | % o storage_class: the image storage class: PseudoClass or DirectClass. |
| 1000 | % |
cristy | c82a27b | 2011-10-21 01:07:16 +0000 | [diff] [blame] | 1001 | % o exception: return any errors or warnings in this structure. |
| 1002 | % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1003 | */ |
| 1004 | MagickExport MagickBooleanType SetCacheViewStorageClass(CacheView *cache_view, |
cristy | c82a27b | 2011-10-21 01:07:16 +0000 | [diff] [blame] | 1005 | const ClassType storage_class,ExceptionInfo *exception) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1006 | { |
| 1007 | assert(cache_view != (CacheView *) NULL); |
| 1008 | assert(cache_view->signature == MagickSignature); |
| 1009 | if (cache_view->debug != MagickFalse) |
| 1010 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 1011 | cache_view->image->filename); |
cristy | c82a27b | 2011-10-21 01:07:16 +0000 | [diff] [blame] | 1012 | return(SetImageStorageClass(cache_view->image,storage_class,exception)); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1013 | } |
| 1014 | |
| 1015 | /* |
| 1016 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1017 | % % |
| 1018 | % % |
| 1019 | % % |
| 1020 | % S e t C a c h e V i e w V i r t u a l P i x e l M e t h o d % |
| 1021 | % % |
| 1022 | % % |
| 1023 | % % |
| 1024 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1025 | % |
| 1026 | % SetCacheViewVirtualPixelMethod() sets the virtual pixel method associated |
| 1027 | % with the specified cache view. |
| 1028 | % |
| 1029 | % The format of the SetCacheViewVirtualPixelMethod method is: |
| 1030 | % |
| 1031 | % MagickBooleanType SetCacheViewVirtualPixelMethod(CacheView *cache_view, |
| 1032 | % const VirtualPixelMethod virtual_pixel_method) |
| 1033 | % |
| 1034 | % A description of each parameter follows: |
| 1035 | % |
| 1036 | % o cache_view: the cache view. |
| 1037 | % |
| 1038 | % o virtual_pixel_method: the virtual pixel method. |
| 1039 | % |
| 1040 | */ |
| 1041 | MagickExport MagickBooleanType SetCacheViewVirtualPixelMethod( |
| 1042 | CacheView *cache_view,const VirtualPixelMethod virtual_pixel_method) |
| 1043 | { |
| 1044 | assert(cache_view != (CacheView *) NULL); |
| 1045 | assert(cache_view->signature == MagickSignature); |
| 1046 | if (cache_view->debug != MagickFalse) |
| 1047 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 1048 | cache_view->image->filename); |
| 1049 | cache_view->virtual_pixel_method=virtual_pixel_method; |
| 1050 | return(MagickTrue); |
| 1051 | } |
| 1052 | |
| 1053 | /* |
| 1054 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1055 | % % |
| 1056 | % % |
| 1057 | % % |
| 1058 | % S y n c C a c h e V i e w A u t h e n t i c P i x e l s % |
| 1059 | % % |
| 1060 | % % |
| 1061 | % % |
| 1062 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1063 | % |
| 1064 | % SyncCacheViewAuthenticPixels() saves the cache view pixels to the in-memory |
| 1065 | % or disk cache. It returns MagickTrue if the pixel region is flushed, |
| 1066 | % otherwise MagickFalse. |
| 1067 | % |
| 1068 | % The format of the SyncCacheViewAuthenticPixels method is: |
| 1069 | % |
| 1070 | % MagickBooleanType SyncCacheViewAuthenticPixels(CacheView *cache_view, |
| 1071 | % ExceptionInfo *exception) |
| 1072 | % |
| 1073 | % A description of each parameter follows: |
| 1074 | % |
| 1075 | % o cache_view: the cache view. |
| 1076 | % |
| 1077 | % o exception: return any errors or warnings in this structure. |
| 1078 | % |
| 1079 | */ |
| 1080 | MagickExport MagickBooleanType SyncCacheViewAuthenticPixels( |
| 1081 | CacheView *cache_view,ExceptionInfo *exception) |
| 1082 | { |
cristy | 5c9e6f2 | 2010-09-17 17:31:01 +0000 | [diff] [blame] | 1083 | const int |
| 1084 | id = GetOpenMPThreadId(); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 1085 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 1086 | MagickBooleanType |
| 1087 | status; |
| 1088 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1089 | assert(cache_view != (CacheView *) NULL); |
| 1090 | assert(cache_view->signature == MagickSignature); |
cristy | 4205a3c | 2010-09-12 20:19:59 +0000 | [diff] [blame] | 1091 | assert(id < (int) cache_view->number_threads); |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 1092 | status=SyncAuthenticPixelCacheNexus(cache_view->image, |
| 1093 | cache_view->nexus_info[id],exception); |
| 1094 | return(status); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1095 | } |