cache_view - ImageMagick Cache Views Methods

- NAME
- SYNOPSIS
- FUNCTION DESCRIPTIONS

- CloseCacheView
- GetCacheView
- GetCacheViewIndexes
- GetCacheViewPixels
- OpenCacheView
- SetCacheView
- SyncCacheView

# NAME

cache_view - ImageMagick Cache Views Methods

# SYNOPSIS

void CloseCacheView( ViewInfo *view );

PixelPacket * GetCacheView( ViewInfo *view, const int x, const int y, const unsigned int columns, const unsigned int rows );

IndexPacket * GetCacheViewIndexes( const ViewInfo *view );

PixelPacket * GetCacheViewPixels( const ViewInfo *view );

ViewInfo * OpenCacheView( Image *image );

PixelPacket * SetCacheView( ViewInfo *view, const int x, const int y, const unsigned int columns, const unsigned int rows );

unsigned int SyncCacheView( ViewInfo *view );

# FUNCTION DESCRIPTIONS

## CloseCacheView

Method CloseCacheView closes the specified view returned by a previous call to OpenCacheView().

The format of the CloseCacheView method is:

> void CloseCacheView ( ViewInfo *view );

A description of each parameter follows:

view:
  The address of a structure of type ViewInfo.

## GetCacheView

Method GetCacheView 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 GetCacheView method is:

> PixelPacket *GetCacheView ( ViewInfo *view, const int x, const int y, const unsigned int columns, const unsigned int rows );

A description of each parameter follows:

pixels:
  Method GetCacheView returns a null pointer if an error occurs, otherwise a pointer to the view pixels.

view:
  The address of a structure of type ViewInfo.

x,y,columns,rows:
  These values define the perimeter of a region of pixels.

## GetCacheViewIndexes

Method GetCacheViewIndexes returns the colormap indexes associated with the specified view.

The format of the GetCacheViewIndexes method is:

> IndexPacket *GetCacheViewIndexes ( const ViewInfo *view );

A description of each parameter follows:

indexes:
  Method GetCacheViewIndexes returns the colormap indexes associated with the specified view.

view:
  The address of a structure of type ViewInfo.

## GetCacheViewPixels

Method GetCacheViewPixels returns the pixels associated with the specified specified view.

The format of the GetCacheViewPixels method is:

> PixelPacket *GetCacheViewPixels ( const ViewInfo *view );

A description of each parameter follows:

pixels:
  Method GetCacheViewPixels returns the pixels associated with the specified view.

view:
  The address of a structure of type ViewInfo.

## OpenCacheView

Method OpenCacheView opens a view into the pixel cache.

The format of the OpenCacheView method is:

> ViewInfo *OpenCacheView ( Image *image );

A description of each parameter follows:

image:
  The address of a structure of type Image.

## SetCacheView

Method SetCacheView 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 SetCacheView method is:

> PixelPacket *SetCacheView ( ViewInfo *view, const int x, const int y, const unsigned int columns, const unsigned int rows );

A description of each parameter follows:

pixels:
  Method SetCacheView returns a null pointer if an error occurs, otherwise a pointer to the view pixels.

view:
  The address of a structure of type ViewInfo.

x,y,columns,rows:
  These values define the perimeter of a region of pixels.

## SyncCacheView

Method SyncCacheView saves the view pixels to the in-memory or disk cache. The method returns True if the pixel region is synced, otherwise False.

The format of the SyncCacheView method is:

> unsigned int SyncCacheView ( ViewInfo *view );

A description of each parameter follows:

status:
  Method SyncCacheView returns True if the view pixels are transferred to the in-memory or disk cache otherwise False.

view:
  The address of a structure of type ViewInfo.