# IShRasterLayerUtilities Struct Reference
[Shell Utilities]

Inheritance diagram for IShRasterLayerUtilities:

List of all members.

## Public Member Functions
virtual MCCOMErr MCCOMAPI | CreateRasterLayer (IShRasterLayer **rasterLayer, uint32 width, uint32 height, ELayerColorType colorType, uint32 bitDepth, MCRasterLayerTempFileHandle *fileHandle=nil, MCRasterLayerTilePoolHandle *poolHandle=nil)=0
virtual void MCCOMAPI | InitRasterLayer (IShRasterLayer *rasterLayer, uint32 width, uint32 height, ELayerColorType colorType, uint32 bitDepth)=0
virtual void MCCOMAPI | InitRasterLayer (IShRasterLayer *rasterLayer, const TMCRect &bounds, ELayerColorType colorType, uint32 bitDepth)=0
virtual MCCOMErr MCCOMAPI | CreateTempFile (MCRasterLayerTempFileHandle *&out_handle)=0
virtual MCCOMErr MCCOMAPI | ReleaseTempFile (MCRasterLayerTempFileHandle *handle)=0
virtual MCCOMErr MCCOMAPI | CreateTilePool (MCRasterLayerTilePoolHandle *&out_handle)=0
virtual MCCOMErr MCCOMAPI | ReleaseTilePool (MCRasterLayerTilePoolHandle *handle)=0
virtual MCCOMErr MCCOMAPI | AddNewChannel (IShRasterLayer *raster, const TChannelID &id, const uint32 bitDepth, IShChannel **channel)=0
virtual MCCOMErr MCCOMAPI | ResizeLayer (IShRasterLayer *source, const TMCRect &sourceRect, IShRasterLayer *dest, const TMCRect &destRect, const TChannelID *channelIDs, uint32 nbChannels, EResizeMethod method)=0
virtual MCCOMErr MCCOMAPI | ResizeChannel (IShChannel *source, const TMCRect &sourceRect, IShChannel *dest, const TMCRect &destRect, EResizeMethod method)=0
virtual MCCOMErr MCCOMAPI | CreateResizedLayer (IShRasterLayer *source, const TMCRect &sourceRect, IShRasterLayer **resizedLayer, const TMCRect &resizedLayerSize, const TChannelID *channelIDs, uint32 nbChannels, EResizeMethod method, boolean keepTilesInMemory)=0
virtual MCCOMErr MCCOMAPI | CreateResizedLayerFromSingleChannel (IShChannel *source, const TMCRect &sourceRect, IShRasterLayer **resizedLayer, const TMCRect &resizedLayerSize, EResizeMethod method, EResizedLayerFill filling, boolean keepTilesInMemory)=0
virtual MCCOMErr MCCOMAPI | CreateEmptyRasterLayer (IShRasterLayer **rasterLayer)=0
virtual MCCOMErr MCCOMAPI | CopyRasterLayer (IShRasterLayer *source, IShRasterLayer **dest)=0
virtual MCCOMErr MCCOMAPI | GetScratchPath (TMCString &scratchPath)=0
virtual MCCOMErr MCCOMAPI | LoadRasterLayer (IShRasterLayer *rasterLayer, IMCFile *aFile, IDType format, TPSIOParameter *param=nil)=0
virtual MCCOMErr MCCOMAPI | LoadLayerList (IShLayerList *layerList, IMCFile *aFile, IDType format, boolean forceLoad, TPSIOParameter *param=nil)=0
virtual MCCOMErr MCCOMAPI | SaveRasterLayer (IShRasterLayer *rasterLayer, const TGBuffer32List *gBuffers, IMCFile *aFile, IDType format, boolean displayOptions=true, TPSOptions *pluginOptions=nil, TPSIOParameter *param=nil)=0
virtual MCCOMErr MCCOMAPI | SaveLayerList (IShLayerList *layerList, const TGBuffer32List *gBuffers, IMCFile *aFile, IDType format, boolean displayOptions=true, TPSOptions *pluginOptions=nil, TPSIOParameter *param=nil)=0
virtual MCCOMErr MCCOMAPI | GetDocumentHandleFromRasterLayer (IShRasterLayer *rasterLayer, APIDocumentHandle **outHandle)=0
virtual void MCCOMAPI | ResizeChunkyLayerToPixelBucket (IShRasterLayer *rasterLayer, TMCPixelBucket &pixelBucket, IYeildCallBackFunc *callBack)=0
virtual MCCOMErr MCCOMAPI | CreateLayerList (IShLayerList **rasterLayer, uint32 width, uint32 height)=0

## Detailed Description

IShRasterLayerUtilties allows to create a rasterlayer object for storing large amounts of data with typed-channel support that is spooled to disk. This is a single rasterlayer not connected to a document or composition.

## Member Function Documentation

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::AddNewChannel | ( | IShRasterLayer * | raster,
|  | const TChannelID & | id,
|  | const uint32 | bitDepth,
|  | IShChannel ** | channel |
| ) |  |  | `[pure virtual]`

Adds a new channel to an existing image.

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::CopyRasterLayer | ( | IShRasterLayer * | source,
|  | IShRasterLayer ** | dest |
| ) |  |  | `[pure virtual]`

Copy a raster layer

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::CreateEmptyRasterLayer | ( | IShRasterLayer ** | rasterLayer | ) | `[pure virtual]`

Creates an image without anything in it.

Parameters:

  | rasterLayer | the resulting empty image

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::CreateLayerList | ( | IShLayerList ** | rasterLayer,
|  | uint32 | width,
|  | uint32 | height |
| ) |  |  | `[pure virtual]`

Creates a new layer list image.

Parameters:

  | rasterLayer | the created image
  | width | the width of the image
  | height | the height of the image

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::CreateRasterLayer | ( | IShRasterLayer ** | rasterLayer,
|  | uint32 | width,
|  | uint32 | height,
|  | ELayerColorType | colorType,
|  | uint32 | bitDepth,
|  | MCRasterLayerTempFileHandle * | fileHandle = `nil`,
|  | MCRasterLayerTilePoolHandle * | poolHandle = `nil` |
| ) |  |  | `[pure virtual]`

Creates a new image.

Parameters:

  | rasterLayer | the created image
  | width | the width of the image
  | height | the height of the image
  | colorType | the colors channels of the image
  | bitDepth | must be 8, 16 or 32
  | fileHandle | can be null (Default one will be provided)
  | poolHandle | can be null (Default one will be provided)

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::CreateResizedLayer | ( | IShRasterLayer * | source,
|  | const TMCRect & | sourceRect,
|  | IShRasterLayer ** | resizedLayer,
|  | const TMCRect & | resizedLayerSize,
|  | const TChannelID * | channelIDs,
|  | uint32 | nbChannels,
|  | EResizeMethod | method,
|  | boolean | keepTilesInMemory |
| ) |  |  | `[pure virtual]`

Creates a new image with a different size from the source image

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::CreateResizedLayerFromSingleChannel | ( | IShChannel * | source,
|  | const TMCRect & | sourceRect,
|  | IShRasterLayer ** | resizedLayer,
|  | const TMCRect & | resizedLayerSize,
|  | EResizeMethod | method,
|  | EResizedLayerFill | filling,
|  | boolean | keepTilesInMemory |
| ) |  |  | `[pure virtual]`

Undocumented

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::CreateTempFile | ( | MCRasterLayerTempFileHandle *& | out_handle | ) | `[pure virtual]`

Undocumented (very rarely used)

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::CreateTilePool | ( | MCRasterLayerTilePoolHandle *& | out_handle | ) | `[pure virtual]`

Undocumented (very rarely used)

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::GetDocumentHandleFromRasterLayer | ( | IShRasterLayer * | rasterLayer,
|  | APIDocumentHandle ** | outHandle |
| ) |  |  | `[pure virtual]`

Undocumented

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::GetScratchPath | ( | TMCString & | scratchPath | ) | `[pure virtual]`

Returns the path where temporary user data is stored.

Parameters:

  | scratchPath | the path of the temp folder

virtual void MCCOMAPI IShRasterLayerUtilities::InitRasterLayer | ( | IShRasterLayer * | rasterLayer,
|  | const TMCRect & | bounds,
|  | ELayerColorType | colorType,
|  | uint32 | bitDepth |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IShRasterLayerUtilities::InitRasterLayer | ( | IShRasterLayer * | rasterLayer,
|  | uint32 | width,
|  | uint32 | height,
|  | ELayerColorType | colorType,
|  | uint32 | bitDepth |
| ) |  |  | `[pure virtual]`

Initialize a raster layer.

Parameters:

  | rasterLayer | The rasterLayer to initialize.
  | width | The new width of the rasterLayer
  | height | The new height of the rasterLayer
  | colorType | The type of channels contained in this raster layer (for ex eLayerRGB or eLayerRGBA)
  | bitDepth | The bit depth (must be 8, 16 or 32)

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::LoadLayerList | ( | IShLayerList * | layerList,
|  | IMCFile * | aFile,
|  | IDType | format,
|  | boolean | forceLoad,
|  | TPSIOParameter * | param = `nil` |
| ) |  |  | `[pure virtual]`

Load an image from a file into a layer list.

Note:
  This function will throw an exception if the file cannot be read. It is important to catch it.

Parameters:

  | layerList | a pointer to a layerList where the image will be stored
  | aFile | a pointer to the file where the image is stored
  | format | the format of the file (can be found using IMCFile::GetMCFileType
  | forceLoad | force loading as layer list even if all layer list options are not supported
  | param | parameters used to load the image (see TPSIOParameter)

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::LoadRasterLayer | ( | IShRasterLayer * | rasterLayer,
|  | IMCFile * | aFile,
|  | IDType | format,
|  | TPSIOParameter * | param = `nil` |
| ) |  |  | `[pure virtual]`

Load an image from a file into a rasterLayer.

Note:
  This function will throw an exception if the file cannot be read. It is important to catch it.

Parameters:

  | rasterLayer | a pointer to a rasterLayer where the image will be stored
  | aFile | a pointer to the file where the image is stored
  | format | the format of the file (can be found using IMCFile::GetMCFileType
  | param | parameters used to load the image (see TPSIOParameter)

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::ReleaseTempFile | ( | MCRasterLayerTempFileHandle * | handle | ) | `[pure virtual]`

Undocumented (very rarely used)

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::ReleaseTilePool | ( | MCRasterLayerTilePoolHandle * | handle | ) | `[pure virtual]`

Undocumented (very rarely used)

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::ResizeChannel | ( | IShChannel * | source,
|  | const TMCRect & | sourceRect,
|  | IShChannel * | dest,
|  | const TMCRect & | destRect,
|  | EResizeMethod | method |
| ) |  |  | `[pure virtual]`

Creates a new channel with a different size from the source channel

virtual void MCCOMAPI IShRasterLayerUtilities::ResizeChunkyLayerToPixelBucket | ( | IShRasterLayer * | rasterLayer,
|  | TMCPixelBucket & | pixelBucket,
|  | IYeildCallBackFunc * | callBack |
| ) |  |  | `[pure virtual]`

Copy the content of the rasterLayer inside the offscreen and resize if necessary.

Note:
  The layer must be a chunky layer.

Parameters:

  | rasterLayer | the source layer
  | pixelBucket | the destination offscreen
  | callBack | a yeild callback if needed

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::ResizeLayer | ( | IShRasterLayer * | source,
|  | const TMCRect & | sourceRect,
|  | IShRasterLayer * | dest,
|  | const TMCRect & | destRect,
|  | const TChannelID * | channelIDs,
|  | uint32 | nbChannels,
|  | EResizeMethod | method |
| ) |  |  | `[pure virtual]`

Not implemented, do NOT use

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::SaveLayerList | ( | IShLayerList * | layerList,
|  | const TGBuffer32List * | gBuffers,
|  | IMCFile * | aFile,
|  | IDType | format,
|  | boolean | displayOptions = `true`,
|  | TPSOptions * | pluginOptions = `nil`,
|  | TPSIOParameter * | param = `nil` |
| ) |  |  | `[pure virtual]`

Saves an image onto the disk.

Parameters:

  | layerList | the image to save
  | gBuffers | Optional pointer to a list of GBuffers associated with the image.
  | aFile | the file into which the image should be written
  | format | the format of the file
  | displayOptions | should a dialog with format specific options (like compression) be shown
  | pluginOptions | useless
  | param | useless

virtual MCCOMErr MCCOMAPI IShRasterLayerUtilities::SaveRasterLayer | ( | IShRasterLayer * | rasterLayer,
|  | const TGBuffer32List * | gBuffers,
|  | IMCFile * | aFile,
|  | IDType | format,
|  | boolean | displayOptions = `true`,
|  | TPSOptions * | pluginOptions = `nil`,
|  | TPSIOParameter * | param = `nil` |
| ) |  |  | `[pure virtual]`

Saves an image onto the disk.

Parameters:

  | rasterLayer | the image to save
  | gBuffers | Optional pointer to a list of GBuffers associated with the image.
  | aFile | the file into which the image should be written
  | format | the format of the file
  | displayOptions | should a dialog with format specific options (like compression) be shown
  | pluginOptions | useless
  | param | useless

The documentation for this struct was generated from the following file:

- IShRasterLayerUtilities.h