ImageMagick: MagickCore, C API for ImageMagick: Cache Views
Author: ImageMagick Studio LLC
Description: ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (P [cell cut: 1167 characters, first 1000 kept]
Keywords: magickcore, c, api, for, imagemagick:, cache, views, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject

## AcquireCacheView AcquireCacheView() acquires a view into the pixel cache, using the VirtualPixelMethod that is defined within the given image itself. The format of the AcquireCacheView method is:
      ViewInfo *AcquireCacheView(const Image *image)
A description of each parameter follows: ##### image the image. ## AcquireCacheViewIndexes AcquireCacheViewIndexes() returns the indexes associated with the specified view. The format of the AcquireCacheViewIndexes method is:
      const IndexPacket *AcquireCacheViewIndexes(const ViewInfo *cache_view)
A description of each parameter follows: ##### cache_view the cache view. ## AcquireCacheViewPixels AcquireCacheViewPixels() gets pixels from the in-memory or disk pixel cache as defined by the geometry parameters. A pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned. The format of the AcquireCacheViewPixels method is:
      const PixelPacket *AcquireCacheViewPixels(const ViewInfo *cache_view,
        const long x,const long y,const unsigned long columns,
        const unsigned long rows,ExceptionInfo *exception)
A description of each parameter follows: ##### cache_view the cache view. ##### x,y,columns,rows These values define the perimeter of a region of pixels. ##### exception Return any errors or warnings in this structure. ## AcquireCacheViewThread AcquireCacheViewThread() acquires a view from a cache view thread set. The format of the AcquireCacheView method is:
      ViewInfo *AcquireCacheViewThread(ViewInfo **cache_views)
A description of each parameter follows: ##### cache_view the cache view thread set. ## AcquireCacheViewThreadSet AcquireCacheViewThreadSet() acquires a set of views, one for each possible thread. The format of the AcquireCacheViewThreadSet method is:
      ViewInfo **AcquireCacheViewThreadSet(const Image *image)
A description of each parameter follows: ##### image the image. ## AcquireCacheViewPixels AcquireCacheViewPixels() returns a single pixel at the specified (x,y) location. The image background color is returned if an error occurs. If you plan to modify the pixel, use GetOneCacheViewPixel() instead. The format of the AcquireOneCacheViewPixel method is:
      PixelPacket AcquireOneCacheViewPixel(const ViewInfo *cache_view,
        const long x,const long y,ExceptionInfo *exception)
A description of each parameter follows: ##### cache_view the cache view. ##### x,y These values define the offset of the pixel. ##### exception Return any errors or warnings in this structure. ## AcquireCacheViewPixels AcquireCacheViewPixels() returns a single pixel at the specified (x,y) location. The image background color is returned if an error occurs. If you plan to modify the pixel, use GetOneCacheViewPixel() instead. The format of the AcquireOneCacheViewPixel method is:
      PixelPacket AcquireOneCacheViewVirtualPixel(const ViewInfo *cache_view,
        const VirtualPixelMethod virtual_pixel_method,const long x,
        const long y,ExceptionInfo *exception)
A description of each parameter follows: ##### cache_view the cache view. ##### virtual_pixel_method the virtual pixel method. ##### x,y These values define the offset of the pixel. ##### exception Return any errors or warnings in this structure. ## CloneCacheView CloneCacheView() makes an exact copy of the specified cache view. The format of the CloneCacheView method is:
      ViewInfo *CloneCacheView(const ViewInfo *cache_view)
A description of each parameter follows: ##### cache_view the cache view. ## DestroyCacheView DestroyCacheView() destroys the specified view returned by a previous call to AcquireCacheView(). The format of the DestroyCacheView method is:
      ViewInfo *DestroyCacheView(ViewInfo *cache_view)
A description of each parameter follows: ##### cache_view the cache view. ## DestroyCacheViewThreadSet DestroyCacheViewThreadSet() destroys a set of cache views previously acquired from the AcquireCacheViewThreadSet() method. The format of the DestoryCacheViewSet method is:
      ViewInfo **DestroyCacheViewThreadSet(ViewInfo **cache_view)
A description of each parameter follows: ##### cache_view the cache views. ## GetCacheViewColorspace GetCacheViewColorspace() returns the image colorspace associated with the specified view. The format of the GetCacheViewColorspace method is:
      ColorspaceType GetCacheViewColorspace(const ViewInfo *cache_view)
A description of each parameter follows: ##### cache_view the cache view. ## GetCacheViewException GetCacheViewException() returns the image exception associated with the specified view. The format of the GetCacheViewException method is:
      ExceptionInfo GetCacheViewException(const ViewInfo *cache_view)
A description of each parameter follows: ##### cache_view the cache view. ## GetCacheViewIndexes GetCacheViewIndexes() returns the indexes associated with the specified view. The format of the GetCacheViewIndexes method is:
      IndexPacket *GetCacheViewIndexes(const ViewInfo *cache_view)
A description of each parameter follows: ##### cache_view the cache view. ## GetCacheViewPixels GetCacheViewPixels() gets pixels from the in-memory or disk pixel cache as defined by the geometry parameters. A pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned. The format of the GetCacheViewPixels method is:
      PixelPacket *GetCacheViewPixels(ViewInfo *cache_view,const long x,
        const long y,const unsigned long columns,const unsigned long rows)
A description of each parameter follows: ##### cache_view the cache view. ##### x,y,columns,rows These values define the perimeter of a region of pixels. ## GetCacheViewStorageClass GetCacheViewStorageClass() returns the image storage class associated with the specified view. The format of the GetCacheViewStorageClass method is:
      ClassType GetCacheViewStorageClass(const ViewInfo *cache_view)
A description of each parameter follows: ##### cache_view the cache view. ## GetOneCacheViewPixel GetOneCacheViewPixel() returns a single pixel at the specified (x,y) location. The image background color is returned if an error occurs. The format of the GetOneCacheViewPixel method is:
      PixelPacket GetOneCacheViewPixel(const ViewInfo *cache_view,
        const long x,const long y)
A description of each parameter follows: ##### cache_view the cache view. ##### x,y These values define the offset of the pixel. ## SetCacheViewPixels SetCacheViewPixels() gets pixels from the in-memory or disk pixel cache as defined by the geometry parameters. A pointer to the pixels is returned if the pixels are transferred, otherwise a NULL is returned. The format of the SetCacheViewPixels method is:
      PixelPacket *SetCacheViewPixels(ViewInfo *cache_view,const long x,
        const long y,const unsigned long columns,const unsigned long rows)
A description of each parameter follows: ##### cache_view the cache view. ##### x,y,columns,rows These values define the perimeter of a region of pixels. ## SetCacheViewStorageClass SetCacheViewStorageClass() sets the image storage class associated with the specified view. The format of the SetCacheViewStorageClass method is:
      MagickBooleanType SetCacheViewStorageClass(ViewInfo *cache_view,
        const ClassType storage_class)
A description of each parameter follows: ##### cache_view the cache view. ##### storage_class the image storage class: PseudoClass or DirectClass. ## SetCacheViewVirtualPixelMethod SetCacheViewVirtualPixelMethod() sets the virtual pixel method associated with the specified cache view. The format of the SetCacheViewVirtualPixelMethod method is:
      MagickBooleanType SetCacheViewVirtualPixelMethod(ViewInfo *cache_view,
        const VirtualPixelMethod virtual_pixel_method)
A description of each parameter follows: ##### cache_view the cache view. ##### virtual_pixel_method the virtual pixel method. ## SyncCacheView SyncCacheView() saves the cache_view pixels to the in-memory or disk cache. The method returns MagickTrue if the pixel region is synced, otherwise MagickFalse. The format of the SyncCacheView method is:
      MagickBooleanType SyncCacheView(ViewInfo *cache_view)
A description of each parameter follows: ##### cache_view the cache view. |

Discourse Server • Mailing Lists • Cafe • Studio