Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATImage::Load
CATResult CATImage::Load ( CATStream stream,
CATImage *&  image 
) [static]

Load() loads an image from a file.

Currently, only .PNG is supported. Images are converted into 32-bit RGBA (8-bits per channel)

Call CATImage::ReleaseImage() when done with the returned image.

Parameters:
stream - an opened stream to load the image from. The stream should be positioned at the start of the image.
image - image ref set to image from stream on success.
Returns:
CATResult - CAT_SUCCESS on success.
Load() loads an image from a file.

Currently, only .PNG is supported.

Call CATImage::ReleaseImage() when done with the returned image.

Parameters:
stream - an opened stream to load the image from. The stream should be positioned at the start of the image.
image - image ref set to image from stream on success.
Returns:
CATResult - CAT_SUCCESS on success.

Definition at line 1235 of file CATImage.cpp.

References CAT_ERR_INVALID_PARAM, CAT_ERR_PNG_ERROR_CREATING_READ, CAT_ERR_PNG_UNSUPPORTED_FORMAT, CAT_SUCCESS, CATASSERT, CATImage(), CATRESULT, CATRESULTFILE, Create(), CATStream::GetName(), GetRawDataPtr(), CATStream::IsOpen(), kBytesPerPixel, PNGError(), PNGRead(), and PNGWarning().

Referenced by CATGuiObj::LoadSkinImage().


Generated on Mon Feb 11 04:10:33 2008 for Game Accessibility Suite by doxygen 1.5.4