ImageIO Class Reference

#include <ImageIO.h>

Inheritance diagram for ImageIO:

Inheritance graph
[legend]
Collaboration diagram for ImageIO:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ImageIO ()
 ImageIO (HTreeObject *htreeobject)
int Write (HBitmapNode *bn, HOutputInfo *outputinfoconst, const String &filename, short *wavedata, BOOL hasaudio)
void CloseWrite (BOOL hasaudio)
virtual BOOL CanLoadImage (const String &filename)
virtual void GetFilesStartEndFrame (const String &filename, int &start, int &end)
virtual BOOL SetSaveOptions (CWnd *parent, const String &extension, float fps)
virtual BOOL GetImageIOInfo (ImageIOInfo &iioinfo)
virtual int OpenWriteFrame (String filename, HBitmapNode *bn, HOutputInfo *outputinfo, BOOL hasaudio)
virtual int WriteFrame (HBitmapNode *bn, HOutputInfo *outputinfo, const String &filename, short *wavedata, BOOL hasaudio)
virtual void CloseWriteFrame (BOOL hasaudio)
virtual int LoadFrame (HBitmapNode *bn, const String &filename, int frame=-1, UINT flags=0)
virtual int IsFileOpen ()

Public Attributes

BOOL m_isopened

Detailed Description

Definition at line 60 of file ImageIO.h.


Constructor & Destructor Documentation

ImageIO::ImageIO  )  [inline]
 

Default ImageIO constructor.

Definition at line 63 of file ImageIO.h.

References FALSE, and m_isopened.

ImageIO::ImageIO HTreeObject htreeobject  )  [inline]
 

Parameters:
htreeobject - is a pointer to the plugins owner. It is the class that the ImageIO is member of. It is the actual class you see in the PWS tree. The constructor only uses it to set the member variable m_treeobject. This member is used for ReAssignPtr. This is also the pointer returned by GetOwner().
See also:
DLLPlugin::DLLPlugin (HTreeObject *htreeobject)

Definition at line 64 of file ImageIO.h.

References FALSE, and m_isopened.


Member Function Documentation

BOOL ImageIO::CanLoadImage const String filename  )  [inline, virtual]
 

This function is called to check if a file with a given filename can be read by the plugin. The function should not just check the filename extension but should also attempt to open the file and read whatever data (that is usually the file header) to make sure it is in the proper format.

Return TRUE if the file can be read by the plugin.

Definition at line 73 of file ImageIO.h.

References FALSE.

void ImageIO::CloseWrite BOOL  hasaudio  )  [inline]
 

For file format that can store multiple frames in the same file, this function is called when the total number of files have been saved.

Definition at line 121 of file ImageIO.h.

References CloseWriteFrame(), FALSE, and m_isopened.

Here is the call graph for this function:

void ImageIO::CloseWriteFrame BOOL  hasaudio  )  [inline, virtual]
 

This function is called to close a file after the total number of frames have been saved.

Definition at line 79 of file ImageIO.h.

Referenced by CloseWrite().

virtual void ImageIO::GetFilesStartEndFrame const String filename,
int &  start,
int &  end
[inline, virtual]
 

Definition at line 74 of file ImageIO.h.

BOOL ImageIO::GetImageIOInfo ImageIOInfo iioinfo  )  [inline, virtual]
 

This function is called when the ImageIO are registered with Animation:Master. The function should fill the ImageIOInfo with the appropriate information.

See also:
ImageIOInfo

Definition at line 76 of file ImageIO.h.

References FALSE.

int ImageIO::IsFileOpen  )  [inline, virtual]
 

Should return TRUE if the file is currently open.

Definition at line 81 of file ImageIO.h.

References FALSE.

int ImageIO::LoadFrame HBitmapNode bn,
const String filename,
int  frame = -1,
UINT  flags = 0
[inline, virtual]
 

This function is called to read a frame from a file.

Parameters:
bn - The HBitmapNode where the frame image data should be loaded.
filename - The filename where the frame image data is loaded from. The filename should be assumed to have been tested with CanLoadImage prior to calling LoadFrame.
frame - Specifies the frame number to load. For file formats that can store only one frame, this parameter will be -1.
flags - Load flags. See HBitmapNode for a list of Load Flags. They are HBitmapNode::LOADDEFAULT, HBitmapNode::LOADBKCOLOR, HBitmapNode::LOADINFOONLY, HBitmapNode::INITIALIZE, HBitmapNode::NOMODIFIEDCHECK and can be OR combined.

Definition at line 80 of file ImageIO.h.

References HBitmapNode::LOAD_FAILED.

int ImageIO::OpenWriteFrame String  filename,
HBitmapNode bn,
HOutputInfo outputinfo,
BOOL  hasaudio
[inline, virtual]
 

This function should open the file.

This would also be the appropriate place to write the file header in the case of file format that allow saving multiple frames in the same file.

Definition at line 77 of file ImageIO.h.

Referenced by Write().

BOOL ImageIO::SetSaveOptions CWnd *  parent,
const String extension,
float  fps
[inline, virtual]
 

This function is called when the user wants to change some save settings. Traditional save settings would be compression, bit-depth, etc.

Definition at line 75 of file ImageIO.h.

References FALSE.

int ImageIO::Write HBitmapNode bn,
HOutputInfo outputinfoconst,
const String filename,
short *  wavedata,
BOOL  hasaudio
[inline]
 

This function is called when a Frame or an image is ready to be saved to file. The file is opened first if it is not already open.

Parameters:
bn - Points to the HBitmapNode that contains the image data, that is all the channels and buffers, to be saved.
outputinfoconst - Points to the HOutputInfo that contains all the metadata that may be stored with the image data.
filename - is the fully qualified filename where the data should be saved.
wavedata - points to an array of sound data.
hasaudio - TRUE if the frame is accompanied with sound data.

Definition at line 90 of file ImageIO.h.

References DLLPlugin::GetClassName(), m_isopened, OpenWriteFrame(), TRUE, HBitmapNode::WRITE_ERROR, and WriteFrame().

Here is the call graph for this function:

int ImageIO::WriteFrame HBitmapNode bn,
HOutputInfo outputinfo,
const String filename,
short *  wavedata,
BOOL  hasaudio
[inline, virtual]
 

This function is called to save a frame to the file. The file is expected to be already opened when this function is called.

Definition at line 78 of file ImageIO.h.

References HBitmapNode::WRITE_NORESULT.

Referenced by Write().


Member Data Documentation

BOOL ImageIO::m_isopened
 

TRUE if file is currently open.

Definition at line 62 of file ImageIO.h.

Referenced by CloseWrite(), ImageIO(), and Write().


The documentation for this class was generated from the following files:
This A:M SDK v12.0 documentation is maintained by Hash Inc. Please address any comments concerning this documentation to AMReports. If you have any information, knowledge, or documentation to share with the A:M developer community, please post them on the Hash SDK forum.

Generated on Thu Oct 27 11:46:59 2005 with doxygen 1.4.5 written by Dimitri van Heesch, © 1997-2001