dmIImageList Class Reference

Maintain a array of images. More...

#include <CCI_ImageList.h>

Inherits dmINotify.

Inherited by dmIColorSpace.

List of all members.

Public Member Functions

bool StoreBuffer (dm_uint index, const dmImage *image, const dm_rect *rect=dm_null, dm_int format=0)
 Store a copy of the image at buffer index index.
bool LoadBuffer (CONST char_t *url _in dm_uint index)
 Load an image from url at buffer index index.
bool SaveBuffer (CONST char_t *url, dm_uint index)
 Save the image at buffer index index to url.
bool IsEmpty (dm_uint index)
 Check if buffer index contains a valid image.
bool ReleaseBuffer (dm_uint index)
 Delete the image located at buffer index.
dmImage * GetBuffer (dm_uint index)
 Retrieve the image at buffer index.
bool CreateBuffer (dm_uint index, dm_int format, dm_uint width, dm_uint height)
 Create a new image in buffer index.
bool Resize (dm_uint size)
 Set the size of the array.
bool ReleaseAll ()
 Release all the images.
bool MoveBuffer (dm_uint from, dm_uint to)
 Move the buffer from location from to location to.
bool SwapBuffers (dm_uint first, dm_uint second)
 Swap images between buffer first and buffer second.
bool CloneBuffer (dm_uint src, dm_uint dst)
 Copy images at src to buffer dst.
bool SetBufferFormat (dm_uint index, dm_int format)
 Change the format of the buffer index.
dm_int GetBufferFormat (dm_uint index)
 Retrieve the format of the image stored at index.
bool SpliceBuffers (dm_uint to, dm_uint from, cci_object *source, dm_uint count)
 Move count images from index from to destination starting at index to.
bool CopyBuffers (dm_uint to, dm_uint from, cci_object *source, dm_uint count)
 Copy count images from index from to destination starting at index to.
dm_uint Size ()
 Return the size of the image list.
bool LoadList (CONST char_t *url, dm_uint from, dm_uint to, dm_bool stop_on_error)
 Load a list of images.
bool SaveList (CONST char_t *url, dm_uint from=0, dm_uint to=-1)
 Save a list of images.
bool SetBufferData (const dmImageData &data, dm_uint index)
 Copy pixels data at buffer index.
bool GetBufferData (dmImageData &data, dm_uint index)
 Get image pixels data from buffer index.


Detailed Description

Maintain a array of images.

This interface expose methods for a container for storing/retrieving indexed images. Indexation enable the ordering of the images as a sequence.


Member Function Documentation

bool dmIImageList::GetBufferData dmImageData data,
dm_uint  index
[inline]
 

Get image pixels data from buffer index.

Parameters:
data A dmImageData object that holds pixels buffer infos.
index Buffer index
Note:
The returned data may be temporary.

bool dmIImageList::LoadList CONST char_t *  url,
dm_uint  from,
dm_uint  to,
dm_bool  stop_on_error
[inline]
 

Load a list of images.

Parameters:
url the template url for the images to be loaded. this string will be formatted by subsituting the pattern "%$" to a 4 digits number corresponding to the index part of the name (Which does not necesserily corresponds to a buffer index).
from the first image index
to the last image index (included).
stop_on_error if set to true, then the method will stop at the first error encountered while storing.
Example :
    LoadList("path/image_%$.png",5,7);
Will store 'path/image_0005.png','path/image_0006.png' and 'path/image_0007.png in the list.
Note:
The list will be cleared automatically before attempting to store. One can look at the Size() method to control the number of images really stored successfully

bool dmIImageList::SaveList CONST char_t *  url,
dm_uint  from = 0,
dm_uint  to = -1
[inline]
 

Save a list of images.

Save the content of the image list using the template string url which should have the same format as described in LoadList().

bool dmIImageList::SetBufferData const dmImageData data,
dm_uint  index
[inline]
 

Copy pixels data at buffer index.

Parameters:
data A dmImageData object that holds pixels buffer infos.
index Buffer index

bool dmIImageList::SetBufferFormat dm_uint  index,
dm_int  format
[inline]
 

Change the format of the buffer index.

If index is equal to -1, all images in the list are converted to the given format.


Generated on Tue May 9 12:34:57 2006 for Daim Library Module Set by  doxygen 1.4.6-NO