]> granicus.if.org Git - imagemagick/blobdiff - magick/cache-view.c
(no commit message)
[imagemagick] / magick / cache-view.c
index cfc841614a1d2c8854f955d9dbcbe57b9da5f9f9..83e843e9896a505a0069f575d29a515c6491a94a 100644 (file)
@@ -23,7 +23,7 @@
 %                               February 2000                                 %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -216,6 +216,39 @@ MagickExport CacheView *DestroyCacheView(CacheView *cache_view)
 %                                                                             %
 %                                                                             %
 %                                                                             %
+%   G e t C a c h e V i e w C h a n n e l s                                   %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  GetCacheViewChannels() returns the image pixel channels associated with
+%  the specified view.
+%
+%  The format of the GetCacheViewChannels method is:
+%
+%      size_t GetCacheViewChannels(const CacheView *cache_view)
+%
+%  A description of each parameter follows:
+%
+%    o cache_view: the cache view.
+%
+*/
+MagickExport size_t GetCacheViewChannels(const CacheView *cache_view)
+{
+  assert(cache_view != (CacheView *) NULL);
+  assert(cache_view->signature == MagickSignature);
+  if (cache_view->debug != MagickFalse)
+    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
+      cache_view->image->filename);
+  return(GetPixelCacheChannels(cache_view->image->cache));
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
 %   G e t C a c h e V i e w C o l o r s p a c e                               %
 %                                                                             %
 %                                                                             %
@@ -241,7 +274,7 @@ MagickExport ColorspaceType GetCacheViewColorspace(const CacheView *cache_view)
   if (cache_view->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
       cache_view->image->filename);
-  return(cache_view->image->colorspace);
+  return(GetPixelCacheColorspace(cache_view->image->cache));
 }
 \f
 /*
@@ -347,7 +380,7 @@ MagickExport ClassType GetCacheViewStorageClass(const CacheView *cache_view)
   if (cache_view->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
       cache_view->image->filename);
-  return(cache_view->image->storage_class);
+  return(GetPixelCacheStorageClass(cache_view->image->cache));
 }
 \f
 /*