Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATImage::Save
CATResult CATImage::Save ( CATStream stream,
CATImage image,
CATIMAGEFORMAT  imageFormat = CATIMAGE_PNG_RGBA32 
) [static]

Save() saves an image to a .png file.

Currently, only .PNG format is supported. Images are saved as 32-bit RGBA (8-bits per channel).

Parameters:
stream - an opened stream to save the image to. The stream should be positioned to the location to save the image to, and it must be writeable.
image - ptr to image to save.
imageFormat - right now, doesn't do anything. Should always be CATIMAGE_PNG_RGBA32.
Returns:
CATResult - CAT_SUCCESS on success.

Definition at line 1398 of file CATImage.cpp.

References AbsWidth(), CAT_ERR_IMAGE_UNKNOWN_FORMAT, CAT_ERR_INVALID_PARAM, CAT_ERR_OUT_OF_MEMORY, CAT_ERR_PNG_ERROR_CREATING_WRITE, CAT_SUCCESS, CATASSERT, CATIMAGE_PNG_RGBA32, CATRESULT, CATRESULTFILE, fData, fHeight, fWidth, CATStream::GetName(), CATStream::IsOpen(), kBytesPerPixel, PNGError(), PNGFlush(), PNGWarning(), PNGWrite(), XOffsetAbs(), and YOffsetAbs().

Referenced by DbgSave(), and Save().


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