LLImageBase Class Reference

#include <llimage.h>

Inheritance diagram for LLImageBase:

Inheritance graph
[legend]
Collaboration diagram for LLImageBase:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { TYPE_NORMAL = 0, TYPE_AVATAR_BAKE = 1 }

Public Member Functions

 LLImageBase ()
virtual void deleteData ()
virtual U8allocateData (S32 size=-1)
virtual U8reallocateData (S32 size=-1)
virtual void dump ()
virtual void sanityCheck ()
U16 getWidth () const
U16 getHeight () const
S8 getComponents () const
S32 getDataSize () const
const U8getData () const
U8getData ()
BOOL isBufferInvalid ()
void setSize (S32 width, S32 height, S32 ncomponents)
U8allocateDataSize (S32 width, S32 height, S32 ncomponents, S32 size=-1)

Static Public Member Functions

static const LLStringgetLastError ()
static void resetLastError ()
static BOOL setLastError (const LLString &message, const LLString &filename=LLString())
static void generateMip (const U8 *indata, U8 *mipdata, int width, int height, S32 nchannels)
static F32 calc_download_priority (F32 virtual_size, F32 visible_area, S32 bytes_sent)
static void setSizeOverride (BOOL enabled)
static EImageCodec getCodecFromExtension (const LLString &exten)

Public Attributes

S16 mMemType

Static Public Attributes

static LLString sLastErrorMessage
static BOOL sSizeOverride = FALSE

Protected Member Functions

virtual ~LLImageBase ()
void setDataAndSize (U8 *data, S32 size)

Private Attributes

U8mData
S32 mDataSize
U16 mWidth
U16 mHeight
S8 mComponents
BOOL mBadBufferAllocation


Detailed Description

Definition at line 78 of file llimage.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
TYPE_NORMAL 
TYPE_AVATAR_BAKE 

Definition at line 86 of file llimage.h.


Constructor & Destructor Documentation

LLImageBase::~LLImageBase (  )  [protected, virtual]

Definition at line 65 of file llimage.cpp.

References deleteData().

Here is the call graph for this function:

LLImageBase::LLImageBase (  ) 

Definition at line 53 of file llimage.cpp.

References FALSE, and mBadBufferAllocation.


Member Function Documentation

void LLImageBase::deleteData (  )  [virtual]

Reimplemented in LLImageRaw, and LLImageFormatted.

Definition at line 116 of file llimage.cpp.

References mData, mDataSize, and NULL.

Referenced by allocateData(), LLImageFormatted::deleteData(), LLImageRaw::deleteData(), and ~LLImageBase().

Here is the caller graph for this function:

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

Reimplemented in LLImageRaw, and LLImageFormatted.

Definition at line 124 of file llimage.cpp.

References deleteData(), FALSE, llendl, llerrs, llformat(), llwarns, mBadBufferAllocation, mComponents, mData, mDataSize, mHeight, mMemType, mWidth, resetLastError(), sSizeOverride, and TRUE.

Referenced by LLImageFormatted::allocateData(), LLImageRaw::allocateData(), and allocateDataSize().

Here is the call graph for this function:

Here is the caller graph for this function:

U8 * LLImageBase::reallocateData ( S32  size = -1  )  [virtual]

Reimplemented in LLImageRaw, and LLImageFormatted.

Definition at line 163 of file llimage.cpp.

References llendl, llmin(), llwarns, mData, mDataSize, mMemType, and S32.

Referenced by LLImageFormatted::reallocateData(), and LLImageRaw::reallocateData().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageBase::dump (  )  [virtual]

Reimplemented in LLImageFormatted.

Definition at line 71 of file llimage.cpp.

References llendl, llinfos, mComponents, mData, mDataSize, mHeight, and mWidth.

Referenced by LLImageFormatted::dump().

Here is the caller graph for this function:

void LLImageBase::sanityCheck (  )  [virtual]

Reimplemented in LLImageFormatted.

Definition at line 82 of file llimage.cpp.

References llendl, llerrs, MAX_IMAGE_COMPONENTS, MAX_IMAGE_DATA_SIZE, MAX_IMAGE_SIZE, mComponents, mData, mDataSize, mHeight, mWidth, and S32.

Referenced by LLImageFormatted::sanityCheck().

Here is the caller graph for this function:

U16 LLImageBase::getWidth (  )  const [inline]

Definition at line 99 of file llimage.h.

References mWidth.

Referenced by LLImageRaw::biasedScaleToPowerOfTwo(), LLImageJ2C::calcDataSize(), LLImageDXT::calcDataSize(), LLImageFormatted::calcDataSize(), LLImageRaw::clear(), LLImageRaw::composite(), LLImageRaw::compositeScaled4onto3(), LLImageRaw::compositeUnscaled4onto3(), LLImageRaw::contractToPowerOfTwo(), LLImageDXT::convertToDXR(), LLImageRaw::copy(), LLImageRaw::copyScaled(), LLImageRaw::copyScaled3onto4(), LLImageRaw::copyScaled4onto3(), LLImageRaw::copyUnscaled(), LLImageRaw::copyUnscaled3onto4(), LLImageRaw::copyUnscaled4onto3(), LLImageGL::createGLTexture(), LLImageTGA::decode(), LLImageJPEG::decode(), LLImageDXT::decode(), LLImageBMP::decode(), LLImageTGA::decodeAndProcess(), LLImageTGA::decodeColorMap(), LLImageBMP::decodeColorMask16(), LLImageBMP::decodeColorMask32(), LLImageBMP::decodeColorTable8(), LLImageTGA::decodeTruecolor(), LLImageBMP::decodeTruecolor24(), LLImageTGA::decodeTruecolorNonRle(), LLImageTGA::decodeTruecolorRle15(), LLImageTGA::decodeTruecolorRle24(), LLImageTGA::decodeTruecolorRle32(), LLImageTGA::decodeTruecolorRle8(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageBMP::encode(), LLImageDXT::encodeDXT(), LLImageJ2COJ::encodeImpl(), LLImageRaw::expandToPowerOfTwo(), LLImageRaw::fill(), LLImageDXT::getMipOffset(), LLImageRaw::getSubImage(), LLVOAvatar::onBakedTextureMasksLoaded(), LLBumpImageList::onSourceLoaded(), LLViewerWindow::rawSnapshot(), LLImageRaw::resize(), LLImageRaw::scale(), LLImageGL::setImage(), LLImagePreviewSculpted::setPreviewTarget(), LLImageGL::setSubImage(), LLImageRaw::setSubImage(), LLImageRaw::verticalFlip(), and LLPngWrapper::writePng().

U16 LLImageBase::getHeight (  )  const [inline]

Definition at line 100 of file llimage.h.

References mHeight.

Referenced by LLImageRaw::biasedScaleToPowerOfTwo(), LLImageJ2C::calcDataSize(), LLImageDXT::calcDataSize(), LLImageFormatted::calcDataSize(), LLImageRaw::clear(), LLImageRaw::composite(), LLImageRaw::compositeScaled4onto3(), LLImageRaw::compositeUnscaled4onto3(), LLImageRaw::contractToPowerOfTwo(), LLImageDXT::convertToDXR(), LLImageRaw::copy(), LLImageRaw::copyScaled(), LLImageRaw::copyScaled3onto4(), LLImageRaw::copyScaled4onto3(), LLImageRaw::copyUnscaled(), LLImageRaw::copyUnscaled3onto4(), LLImageRaw::copyUnscaled4onto3(), LLImageGL::createGLTexture(), LLImageTGA::decode(), LLImageJPEG::decode(), LLImageDXT::decode(), LLImageBMP::decode(), LLImageTGA::decodeAndProcess(), LLImageTGA::decodeColorMap(), LLImageBMP::decodeColorMask16(), LLImageBMP::decodeColorMask32(), LLImageBMP::decodeColorTable8(), LLImageTGA::decodeTruecolor(), LLImageBMP::decodeTruecolor24(), LLImageTGA::decodeTruecolorNonRle(), LLImageTGA::decodeTruecolorRle15(), LLImageTGA::decodeTruecolorRle24(), LLImageTGA::decodeTruecolorRle32(), LLImageTGA::decodeTruecolorRle8(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageBMP::encode(), LLImageDXT::encodeDXT(), LLImageJ2COJ::encodeImpl(), LLImageRaw::expandToPowerOfTwo(), LLImageRaw::fill(), LLImageDXT::getMipOffset(), LLVOAvatar::onBakedTextureMasksLoaded(), LLBumpImageList::onSourceLoaded(), LLViewerWindow::rawSnapshot(), LLImageRaw::resize(), LLImageRaw::scale(), LLImageGL::setImage(), LLImagePreviewSculpted::setPreviewTarget(), LLImageGL::setSubImage(), LLImageRaw::verticalFlip(), and LLPngWrapper::writePng().

S8 LLImageBase::getComponents (  )  const [inline]

S32 LLImageBase::getDataSize (  )  const [inline]

const U8 * LLImageBase::getData (  )  const

Definition at line 183 of file llimage.cpp.

References llendl, llerrs, mBadBufferAllocation, and mData.

Referenced by LLImageFormatted::appendData(), LLImageRaw::clear(), LLImageRaw::compositeScaled4onto3(), LLImageRaw::compositeUnscaled4onto3(), LLImageDXT::convertToDXR(), LLImageFormatted::copyData(), LLImageRaw::copyScaled(), LLImageRaw::copyUnscaled(), LLImageRaw::copyUnscaled3onto4(), LLImageRaw::copyUnscaled4onto3(), LLImageGL::createGLTexture(), LLImageTGA::decode(), LLImagePNG::decode(), LLImageJPEG::decode(), LLImageDXT::decode(), LLImageBMP::decode(), LLImageTGA::decodeAndProcess(), LLImageJ2C::decodeChannels(), LLImageTGA::decodeColorMap(), LLImageJ2COJ::decodeImpl(), LLImageTGA::decodeTruecolorNonRle(), LLImageTGA::decodeTruecolorRle15(), LLImageTGA::decodeTruecolorRle24(), LLImageTGA::decodeTruecolorRle32(), LLImageTGA::decodeTruecolorRle8(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageBMP::encode(), LLImageDXT::encodeDXT(), LLImageJ2COJ::encodeImpl(), LLImageRaw::fill(), LLImageJ2COJ::getMetadata(), LLImageDXT::getMipData(), LLImageRaw::getSubImage(), LLImageRaw::LLImageRaw(), LLVOAvatar::onBakedTextureMasksLoaded(), LLBumpImageList::onSourceLoaded(), LLViewerWindow::rawSnapshot(), LLImageGL::readBackRaw(), LLPngWrapper::readPng(), LLImageFormatted::save(), LLImageRaw::scale(), LLImageFormatted::setData(), LLImageGL::setImage(), LLImagePreviewSculpted::setPreviewTarget(), LLImageGL::setSubImage(), LLImageRaw::setSubImage(), LLViewerWindow::thumbnailSnapshot(), LLImageTGA::updateData(), LLImagePNG::updateData(), LLImageJPEG::updateData(), LLImageJ2C::updateData(), LLImageDXT::updateData(), LLImageBMP::updateData(), LLImageJ2C::validate(), LLImageRaw::verticalFlip(), and LLPngWrapper::writePng().

U8 * LLImageBase::getData (  ) 

Definition at line 193 of file llimage.cpp.

References llendl, llerrs, mBadBufferAllocation, and mData.

BOOL LLImageBase::isBufferInvalid (  ) 

Definition at line 203 of file llimage.cpp.

References mBadBufferAllocation, mData, and NULL.

Referenced by LLViewerWindow::rawSnapshot().

Here is the caller graph for this function:

void LLImageBase::setSize ( S32  width,
S32  height,
S32  ncomponents 
)

U8 * LLImageBase::allocateDataSize ( S32  width,
S32  height,
S32  ncomponents,
S32  size = -1 
)

Definition at line 215 of file llimage.cpp.

References allocateData(), and setSize().

Referenced by LLImageRaw::LLImageRaw(), LLImageGL::readBackRaw(), LLImageRaw::resize(), and LLImageRaw::scale().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageBase::setDataAndSize ( U8 data,
S32  size 
) [inline, protected]

Definition at line 113 of file llimage.h.

References mData, and mDataSize.

Referenced by LLImageFormatted::setData().

Here is the caller graph for this function:

static const LLString& LLImageBase::getLastError (  )  [inline, static]

Definition at line 116 of file llimage.h.

References sLastErrorMessage.

Referenced by handle_compress_image(), and upload_new_resource().

Here is the caller graph for this function:

static void LLImageBase::resetLastError (  )  [inline, static]

BOOL LLImageBase::setLastError ( const LLString message,
const LLString filename = LLString() 
) [static]

static void LLImageBase::generateMip ( const U8 indata,
U8 mipdata,
int  width,
int  height,
S32  nchannels 
) [static]

Referenced by LLImageDXT::encodeDXT(), and LLImageGL::setImage().

Here is the caller graph for this function:

F32 LLImageBase::calc_download_priority ( F32  virtual_size,
F32  visible_area,
S32  bytes_sent 
) [static]

Definition at line 1593 of file llimage.cpp.

static void LLImageBase::setSizeOverride ( BOOL  enabled  )  [inline, static]

Definition at line 126 of file llimage.h.

References sSizeOverride.

Referenced by LLFileTakeSnapshotToDisk::handleEvent(), and LLViewerWindow::saveImageNumbered().

Here is the caller graph for this function:

EImageCodec LLImageBase::getCodecFromExtension ( const LLString exten  )  [static]

Definition at line 1128 of file llimage.cpp.

References file_extensions, i, IMG_CODEC_INVALID, and NUM_FILE_EXTENSIONS.

Referenced by LLImageFormatted::createFromExtension(), LLImageRaw::createFromFile(), and LLTextureCacheLocalFileWorker::doRead().

Here is the caller graph for this function:


Member Data Documentation

U8* LLImageBase::mData [private]

Definition at line 134 of file llimage.h.

Referenced by allocateData(), dump(), getWidth(), sanityCheck(), and setSize().

Definition at line 135 of file llimage.h.

Referenced by allocateData(), dump(), getHeight(), sanityCheck(), and setSize().

Definition at line 137 of file llimage.h.

Referenced by allocateData(), dump(), getComponents(), sanityCheck(), and setSize().

Definition at line 139 of file llimage.h.

Referenced by allocateData(), getData(), isBufferInvalid(), and LLImageBase().

Definition at line 144 of file llimage.h.

Referenced by getLastError(), resetLastError(), and setLastError().

BOOL LLImageBase::sSizeOverride = FALSE [static]

Definition at line 146 of file llimage.h.

Referenced by allocateData(), and setSizeOverride().


The documentation for this class was generated from the following files:

Generated on Fri May 16 08:49:28 2008 for SecondLife by  doxygen 1.5.5