LLImageFormatted Class Reference

#include <llimage.h>

Inheritance diagram for LLImageFormatted:

Inheritance graph
[legend]
Collaboration diagram for LLImageFormatted:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLImageFormatted (S8 codec)
void deleteData ()
U8allocateData (S32 size=-1)
U8reallocateData (S32 size)
void dump ()
void sanityCheck ()
virtual S32 calcHeaderSize ()
virtual S32 calcDataSize (S32 discard_level)
virtual S32 calcDiscardLevelBytes (S32 bytes)
virtual S8 getRawDiscardLevel ()
BOOL load (const LLString &filename)
BOOL save (const LLString &filename)
virtual BOOL updateData ()=0
void setData (U8 *data, S32 size)
void appendData (U8 *data, S32 size)
virtual BOOL decode (LLImageRaw *raw_image, F32 decode_time=0.0)=0
virtual BOOL decode (LLImageRaw *raw_image, F32 decode_time, S32 first_channel, S32 max_channel)
virtual BOOL encode (const LLImageRaw *raw_image, F32 encode_time=0.0)=0
S8 getCodec () const
BOOL isDecoding () const
BOOL isDecoded () const
void setDiscardLevel (S8 discard_level)
S8 getDiscardLevel () const

Static Public Member Functions

static LLImageFormattedcreateFromType (S8 codec)
static LLImageFormattedcreateFromExtension (const LLString &instring)

Static Public Attributes

static S32 sGlobalFormattedMemory = 0

Protected Member Functions

 ~LLImageFormatted ()
BOOL copyData (U8 *data, S32 size)

Protected Attributes

S8 mCodec
S8 mDecoding
S8 mDecoded
S8 mDiscardLevel

Detailed Description

Definition at line 230 of file llimage.h.


Constructor & Destructor Documentation

LLImageFormatted::~LLImageFormatted (  )  [protected]

Definition at line 1235 of file llimage.cpp.

References deleteData().

LLImageFormatted::LLImageFormatted ( S8  codec  ) 

Definition at line 1224 of file llimage.cpp.

References LLImageBase::mMemType, and LLMemType::MTYPE_IMAGEFORMATTED.


Member Function Documentation

U8 * LLImageFormatted::allocateData ( S32  size = -1  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1352 of file llimage.cpp.

References LLImageBase::allocateData(), LLImageBase::getDataSize(), and sGlobalFormattedMemory.

Referenced by copyData(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageDXT::encode(), LLImageBMP::encode(), load(), and LLImageTGA::loadFile().

void LLImageFormatted::appendData ( U8 data,
S32  size 
)

Definition at line 1416 of file llimage.cpp.

References LLImageBase::getData(), LLImageBase::getDataSize(), reallocateData(), S32, and setData().

S32 LLImageFormatted::calcDataSize ( S32  discard_level  )  [virtual]

Reimplemented in LLImageDXT, and LLImageJ2C.

Definition at line 1306 of file llimage.cpp.

References LLImageBase::getComponents(), LLImageBase::getHeight(), LLImageBase::getWidth(), llmax(), mDiscardLevel, and S32.

Referenced by calcDiscardLevelBytes().

S32 LLImageFormatted::calcDiscardLevelBytes ( S32  bytes  )  [virtual]

Reimplemented in LLImageJ2C.

Definition at line 1319 of file llimage.cpp.

References calcDataSize(), llassert, MAX_IMAGE_MIP, and S32.

Referenced by LLImageDXT::updateData().

virtual S32 LLImageFormatted::calcHeaderSize (  )  [inline, virtual]

Reimplemented in LLImageDXT, and LLImageJ2C.

Definition at line 255 of file llimage.h.

BOOL LLImageFormatted::copyData ( U8 data,
S32  size 
) [protected]

Definition at line 1394 of file llimage.cpp.

References allocateData(), deleteData(), LLImageBase::getData(), LLImageBase::getDataSize(), and TRUE.

LLImageFormatted * LLImageFormatted::createFromExtension ( const LLString instring  )  [static]

Definition at line 1275 of file llimage.cpp.

References codec, createFromType(), exten, and get_codec().

Referenced by LLViewerWindow::saveImageNumbered().

LLImageFormatted * LLImageFormatted::createFromType ( S8  codec  )  [static]

Definition at line 1245 of file llimage.cpp.

References IMG_CODEC_BMP, IMG_CODEC_DXT, IMG_CODEC_J2C, IMG_CODEC_JPEG, IMG_CODEC_TGA, and NULL.

Referenced by createFromExtension(), and LLTextureCache::ReadResponder::setData().

BOOL LLImageFormatted::decode ( LLImageRaw raw_image,
F32  decode_time,
S32  first_channel,
S32  max_channel 
) [virtual]

Reimplemented in LLImageJ2C.

Definition at line 1343 of file llimage.cpp.

References decode(), and llassert.

virtual BOOL LLImageFormatted::decode ( LLImageRaw raw_image,
F32  decode_time = 0.0 
) [pure virtual]

Implemented in LLImageBMP, LLImageDXT, LLImageJ2C, LLImageJPEG, LLImagePNG, and LLImageTGA.

Referenced by decode().

void LLImageFormatted::deleteData (  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1369 of file llimage.cpp.

References LLImageBase::deleteData(), LLImageBase::getDataSize(), and sGlobalFormattedMemory.

Referenced by copyData(), LLImageTGA::encode(), load(), LLImageTGA::loadFile(), setData(), and ~LLImageFormatted().

void LLImageFormatted::dump (  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1293 of file llimage.cpp.

References LLImageBase::dump(), llendl, llinfos, mCodec, mDecoded, mDecoding, and S32.

virtual BOOL LLImageFormatted::encode ( const LLImageRaw raw_image,
F32  encode_time = 0.0 
) [pure virtual]

Implemented in LLImageBMP, LLImageDXT, LLImageJ2C, LLImageJPEG, LLImagePNG, and LLImageTGA.

S8 LLImageFormatted::getCodec (  )  const

Definition at line 1497 of file llimage.cpp.

References mCodec.

Referenced by LLTextureFetchWorker::callbackCacheRead().

S8 LLImageFormatted::getDiscardLevel (  )  const [inline]

Definition at line 281 of file llimage.h.

References mDiscardLevel.

virtual S8 LLImageFormatted::getRawDiscardLevel (  )  [inline, virtual]

Reimplemented in LLImageJ2C.

Definition at line 261 of file llimage.h.

References mDiscardLevel.

BOOL LLImageFormatted::isDecoded (  )  const [inline]

Definition at line 279 of file llimage.h.

References FALSE, mDecoded, and TRUE.

BOOL LLImageFormatted::isDecoding (  )  const [inline]

Definition at line 278 of file llimage.h.

References FALSE, mDecoding, and TRUE.

BOOL LLImageFormatted::load ( const LLString filename  ) 

Definition at line 1436 of file llimage.cpp.

References allocateData(), deleteData(), FALSE, ll_apr_file_open(), LL_APR_RB, LLImageBase::resetLastError(), s, S32, LLImageBase::setLastError(), and updateData().

U8 * LLImageFormatted::reallocateData ( S32  size  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1360 of file llimage.cpp.

References LLImageBase::getDataSize(), LLImageBase::reallocateData(), and sGlobalFormattedMemory.

Referenced by appendData().

void LLImageFormatted::sanityCheck (  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1378 of file llimage.cpp.

References IMG_CODEC_EOF, llendl, llerrs, mCodec, mDecoded, mDecoding, S32, and LLImageBase::sanityCheck().

BOOL LLImageFormatted::save ( const LLString filename  ) 

Definition at line 1473 of file llimage.cpp.

References FALSE, LLImageBase::getData(), LLImageBase::getDataSize(), ll_apr_file_open(), ll_apr_file_write(), LL_APR_WB, LLImageBase::resetLastError(), LLImageBase::setLastError(), and TRUE.

Referenced by LLVOVolume::writeCAL3D().

void LLImageFormatted::setData ( U8 data,
S32  size 
)

Definition at line 1406 of file llimage.cpp.

References deleteData(), LLImageBase::getData(), LLImageBase::getDataSize(), LLImageBase::setDataAndSize(), and sGlobalFormattedMemory.

Referenced by appendData(), LLImageDXT::convertToDXR(), and LLImageJ2C::validate().

void LLImageFormatted::setDiscardLevel ( S8  discard_level  )  [inline]

Definition at line 280 of file llimage.h.

References mDiscardLevel.

Referenced by LLImageJ2C::updateData(), and LLImageDXT::updateData().

virtual BOOL LLImageFormatted::updateData (  )  [pure virtual]

Implemented in LLImageBMP, LLImageDXT, LLImageJ2C, LLImageJPEG, LLImagePNG, and LLImageTGA.

Referenced by load().


Member Data Documentation

S8 LLImageFormatted::mCodec [protected]

Definition at line 287 of file llimage.h.

Referenced by dump(), getCodec(), and sanityCheck().

S8 LLImageFormatted::mDecoded [protected]

Definition at line 289 of file llimage.h.

Referenced by dump(), isDecoded(), and sanityCheck().

S8 LLImageFormatted::mDecoding [protected]

Definition at line 288 of file llimage.h.

Referenced by LLImageJ2C::decode(), LLImageJ2C::decodeFailed(), dump(), isDecoding(), and sanityCheck().

S8 LLImageFormatted::mDiscardLevel [protected]

Definition at line 290 of file llimage.h.

Referenced by LLImageDXT::calcDataSize(), calcDataSize(), getDiscardLevel(), LLImageDXT::getMipData(), getRawDiscardLevel(), setDiscardLevel(), and LLImageJ2C::updateRawDiscardLevel().

S32 LLImageFormatted::sGlobalFormattedMemory = 0 [static]

Definition at line 293 of file llimage.h.

Referenced by allocateData(), deleteData(), output_statistics(), reallocateData(), setData(), and LLViewerImageList::updateImages().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:25 2010 for Second Life Viewer by  doxygen 1.4.7