2 Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 http://www.imagemagick.org/script/license.php
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
16 MagickCore cache private methods.
18 #ifndef _MAGICKCORE_CACHE_PRIVATE_H
19 #define _MAGICKCORE_CACHE_PRIVATE_H
21 #if defined(__cplusplus) || defined(c_plusplus)
26 #include "magick/random_.h"
27 #include "magick/thread-private.h"
28 #include "magick/semaphore.h"
42 typedef const IndexPacket
43 *(*GetVirtualIndexesFromHandler)(const Image *);
46 *(*GetAuthenticIndexesFromHandler)(const Image *);
48 typedef MagickBooleanType
49 (*GetOneAuthenticPixelFromHandler)(Image *,const ssize_t,const ssize_t,
50 PixelPacket *,ExceptionInfo *),
51 (*GetOneVirtualPixelFromHandler)(const Image *,const VirtualPixelMethod,
52 const ssize_t,const ssize_t,PixelPacket *,ExceptionInfo *),
53 (*SyncAuthenticPixelsHandler)(Image *,ExceptionInfo *);
55 typedef const PixelPacket
56 *(*GetVirtualPixelHandler)(const Image *,const VirtualPixelMethod,
57 const ssize_t,const ssize_t,const size_t,const size_t,ExceptionInfo *),
58 *(*GetVirtualPixelsHandler)(const Image *);
61 *(*GetAuthenticPixelsHandler)(Image *,const ssize_t,const ssize_t,
62 const size_t,const size_t,ExceptionInfo *);
65 *(*GetAuthenticPixelsFromHandler)(const Image *);
68 *(*QueueAuthenticPixelsHandler)(Image *,const ssize_t,const ssize_t,
69 const size_t,const size_t,ExceptionInfo *);
72 (*DestroyPixelHandler)(Image *);
74 typedef struct _CacheMethods
76 GetVirtualPixelHandler
77 get_virtual_pixel_handler;
79 GetVirtualPixelsHandler
80 get_virtual_pixels_handler;
82 GetVirtualIndexesFromHandler
83 get_virtual_indexes_from_handler;
85 GetOneVirtualPixelFromHandler
86 get_one_virtual_pixel_from_handler;
88 GetAuthenticPixelsHandler
89 get_authentic_pixels_handler;
91 GetAuthenticIndexesFromHandler
92 get_authentic_indexes_from_handler;
94 GetOneAuthenticPixelFromHandler
95 get_one_authentic_pixel_from_handler;
97 GetAuthenticPixelsFromHandler
98 get_authentic_pixels_from_handler;
100 QueueAuthenticPixelsHandler
101 queue_authentic_pixels_handler;
103 SyncAuthenticPixelsHandler
104 sync_authentic_pixels_handler;
107 destroy_pixel_handler;
110 typedef struct _NexusInfo
113 typedef struct _CacheInfo
144 virtual_pixel_method;
162 active_index_channel;
168 filename[MaxTextExtent],
169 cache_filename[MaxTextExtent];
197 extern MagickExport Cache
198 AcquirePixelCache(const size_t),
199 ClonePixelCache(const Cache),
200 DestroyPixelCache(Cache),
201 ReferencePixelCache(Cache);
203 extern MagickExport CacheType
204 GetPixelCacheType(const Image *);
206 extern MagickExport ClassType
207 GetPixelCacheStorageClass(const Cache);
209 extern MagickExport ColorspaceType
210 GetPixelCacheColorspace(const Cache);
212 extern MagickExport const IndexPacket
213 *GetVirtualIndexesFromNexus(const Cache,NexusInfo *);
215 extern MagickExport const PixelPacket
216 *GetVirtualPixelsFromNexus(const Image *,const VirtualPixelMethod,
217 const ssize_t,const ssize_t,const size_t,const size_t,NexusInfo *,
219 *GetVirtualPixelsNexus(const Cache,NexusInfo *);
221 extern MagickExport IndexPacket
222 *GetPixelCacheNexusIndexes(const Cache,NexusInfo *);
224 extern MagickExport MagickBooleanType
225 SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *);
227 extern MagickExport MagickSizeType
228 GetPixelCacheNexusExtent(const Cache,NexusInfo *);
230 extern MagickExport NexusInfo
231 **AcquirePixelCacheNexus(const size_t),
232 **DestroyPixelCacheNexus(NexusInfo **,const size_t);
234 extern MagickExport PixelPacket
235 *GetAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
236 const size_t,const size_t,NexusInfo *,ExceptionInfo *),
237 *GetPixelCacheNexusPixels(const Cache,NexusInfo *),
238 *QueueAuthenticNexus(Image *,const ssize_t,const ssize_t,const size_t,
239 const size_t,NexusInfo *,ExceptionInfo *);
241 extern MagickExport size_t
242 GetPixelCacheChannels(const Cache);
244 extern MagickExport void
245 ClonePixelCacheMethods(Cache,const Cache),
246 GetPixelCacheTileSize(const Image *,size_t *,size_t *),
247 GetPixelCacheMethods(CacheMethods *),
248 SetPixelCacheMethods(Cache,CacheMethods *);
250 #if defined(__cplusplus) || defined(c_plusplus)