2 Copyright 1999-2010 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 long,const long,
50 PixelPacket *,ExceptionInfo *),
51 (*GetOneVirtualPixelFromHandler)(const Image *,const VirtualPixelMethod,
52 const long,const long,PixelPacket *,ExceptionInfo *),
53 (*SyncAuthenticPixelsHandler)(Image *,ExceptionInfo *);
55 typedef const PixelPacket
56 *(*GetVirtualPixelHandler)(const Image *,const VirtualPixelMethod,const long,
57 const long,const unsigned long,const unsigned long,ExceptionInfo *),
58 *(*GetVirtualPixelsHandler)(const Image *);
61 *(*GetAuthenticPixelsHandler)(Image *,const long,const long,
62 const unsigned long,const unsigned long,ExceptionInfo *);
65 *(*GetAuthenticPixelsFromHandler)(const Image *);
68 *(*QueueAuthenticPixelsHandler)(Image *,const long,const long,
69 const unsigned long,const unsigned long,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;
111 typedef struct _NexusInfo
114 typedef struct _CacheInfo
142 virtual_pixel_method;
160 active_index_channel;
166 filename[MaxTextExtent],
167 cache_filename[MaxTextExtent];
195 extern MagickExport Cache
196 AcquirePixelCache(const unsigned long),
197 ClonePixelCache(const Cache),
198 DestroyPixelCache(Cache),
199 GetImagePixelCache(Image *,const MagickBooleanType,ExceptionInfo *),
200 ReferencePixelCache(Cache);
202 extern MagickExport CacheType
203 GetPixelCacheType(const Image *);
205 extern MagickExport ClassType
206 GetPixelCacheStorageClass(const Cache);
208 extern MagickExport ColorspaceType
209 GetPixelCacheColorspace(const Cache);
211 extern MagickExport const IndexPacket
212 *GetVirtualIndexesFromNexus(const Cache,NexusInfo *);
214 extern MagickExport const PixelPacket
215 *GetVirtualPixelsFromNexus(const Image *,const VirtualPixelMethod,const long,
216 const long,const unsigned long,const unsigned long,NexusInfo *,
218 *GetVirtualPixelsNexus(const Cache,NexusInfo *);
220 extern MagickExport IndexPacket
221 *GetPixelCacheNexusIndexes(const Cache,NexusInfo *);
223 extern MagickExport MagickBooleanType
224 SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *);
226 extern MagickExport MagickSizeType
227 GetPixelCacheNexusExtent(const Cache,NexusInfo *);
229 extern MagickExport NexusInfo
230 **AcquirePixelCacheNexus(const unsigned long),
231 **DestroyPixelCacheNexus(NexusInfo **,const unsigned long);
233 extern MagickExport PixelPacket
234 *GetAuthenticPixelCacheNexus(Image *,const long,const long,
235 const unsigned long,const unsigned long,NexusInfo *,ExceptionInfo *),
236 *GetPixelCacheNexusPixels(const Cache,NexusInfo *),
237 *QueueAuthenticNexus(Image *,const long,const long,const unsigned long,
238 const unsigned long,NexusInfo *,ExceptionInfo *);
240 extern MagickExport void
241 ClonePixelCacheMethods(Cache,const Cache),
242 GetPixelCacheTileSize(const Image *,unsigned long *,unsigned long *),
243 GetPixelCacheMethods(CacheMethods *),
244 SetPixelCacheMethods(Cache,CacheMethods *);
246 #if defined(__cplusplus) || defined(c_plusplus)