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"
41 typedef const IndexPacket
42 *(*GetVirtualIndexesFromHandler)(const Image *);
45 *(*GetAuthenticIndexesFromHandler)(const Image *);
47 typedef MagickBooleanType
48 (*GetOneAuthenticPixelFromHandler)(Image *,const long,const long,
49 PixelPacket *,ExceptionInfo *),
50 (*GetOneVirtualPixelFromHandler)(const Image *,const VirtualPixelMethod,
51 const long,const long,PixelPacket *,ExceptionInfo *),
52 (*SyncAuthenticPixelsHandler)(Image *,ExceptionInfo *);
54 typedef const PixelPacket
55 *(*GetVirtualPixelHandler)(const Image *,const VirtualPixelMethod,const long,
56 const long,const unsigned long,const unsigned long,ExceptionInfo *),
57 *(*GetVirtualPixelsHandler)(const Image *);
60 *(*GetAuthenticPixelsHandler)(Image *,const long,const long,
61 const unsigned long,const unsigned long,ExceptionInfo *);
64 *(*GetAuthenticPixelsFromHandler)(const Image *);
67 *(*QueueAuthenticPixelsHandler)(Image *,const long,const long,
68 const unsigned long,const unsigned long,ExceptionInfo *);
71 (*DestroyPixelHandler)(Image *);
73 typedef struct _CacheMethods
75 GetVirtualPixelHandler
76 get_virtual_pixel_handler;
78 GetVirtualPixelsHandler
79 get_virtual_pixels_handler;
81 GetVirtualIndexesFromHandler
82 get_virtual_indexes_from_handler;
84 GetOneVirtualPixelFromHandler
85 get_one_virtual_pixel_from_handler;
87 GetAuthenticPixelsHandler
88 get_authentic_pixels_handler;
90 GetAuthenticIndexesFromHandler
91 get_authentic_indexes_from_handler;
93 GetOneAuthenticPixelFromHandler
94 get_one_authentic_pixel_from_handler;
96 GetAuthenticPixelsFromHandler
97 get_authentic_pixels_from_handler;
99 QueueAuthenticPixelsHandler
100 queue_authentic_pixels_handler;
102 SyncAuthenticPixelsHandler
103 sync_authentic_pixels_handler;
106 destroy_pixel_handler;
110 typedef struct _NexusInfo
113 typedef struct _CacheInfo
141 virtual_pixel_method;
156 active_index_channel;
162 filename[MaxTextExtent],
163 cache_filename[MaxTextExtent];
191 extern MagickExport Cache
192 AcquirePixelCache(const unsigned long),
193 ClonePixelCache(const Cache),
194 DestroyPixelCache(Cache),
195 GetImagePixelCache(Image *,const MagickBooleanType,ExceptionInfo *),
196 ReferencePixelCache(Cache);
198 extern MagickExport CacheType
199 GetPixelCacheType(const Image *);
201 extern MagickExport ClassType
202 GetPixelCacheStorageClass(const Cache);
204 extern MagickExport ColorspaceType
205 GetPixelCacheColorspace(const Cache);
207 extern MagickExport const IndexPacket
208 *GetVirtualIndexesFromNexus(const Cache,NexusInfo *);
210 extern MagickExport const PixelPacket
211 *GetVirtualPixelsFromNexus(const Image *,const VirtualPixelMethod,const long,
212 const long,const unsigned long,const unsigned long,NexusInfo *,
214 *GetVirtualPixelsNexus(const Cache,NexusInfo *);
216 extern MagickExport IndexPacket
217 *GetPixelCacheNexusIndexes(const Cache,NexusInfo *);
219 extern MagickExport MagickBooleanType
220 SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *);
222 extern MagickExport MagickSizeType
223 GetPixelCacheNexusExtent(const Cache,NexusInfo *);
225 extern MagickExport NexusInfo
226 **AcquirePixelCacheNexus(const unsigned long),
227 **DestroyPixelCacheNexus(NexusInfo **,const unsigned long);
229 extern MagickExport PixelPacket
230 *GetAuthenticPixelCacheNexus(Image *,const long,const long,
231 const unsigned long,const unsigned long,NexusInfo *,ExceptionInfo *),
232 *GetPixelCacheNexusPixels(const Cache,NexusInfo *),
233 *QueueAuthenticNexus(Image *,const long,const long,const unsigned long,
234 const unsigned long,NexusInfo *,ExceptionInfo *);
237 extern MagickExport void
238 ClonePixelCacheMethods(Cache,const Cache),
239 GetPixelCacheTileSize(const Image *,unsigned long *,unsigned long *),
240 GetPixelCacheMethods(CacheMethods *),
241 *GetPixelCachePixels(Image *,MagickSizeType *),
242 SetPixelCacheMethods(Cache,CacheMethods *);
244 #if defined(__cplusplus) || defined(c_plusplus)